SAS Listings In Word Documents: Formatting and Style ...



SAS Listings In Word Documents: Formatting and Style SuggestionsHere are some formatting suggestions for SAS listings brought into Word documents, including instructions for creating a new Word Style that can easily be applied to any paragraph or an entire document.If you are using SAS 9.3 with htm output, simply select the output to be copied and then paste it into the Word document. If you are using a plain text listing, read on.Bringing a Listing into WordFirst, tell Word that you want it to ask you what kind of conversion to do when it opens a file. While you have a document open, File, Options, Advanced. Check “Confirm file format conversion on open.” From then on, Word will ask you what conversion to use when you open a listing (or other file that is not a Word document file). Now, open a SAS listing in Word: Right-click on the name of the listing in the folder where it is stored. From the drop-down menu, select Open With, Microsoft Word for Windows. If the Word option does not appear, select Choose Default Program, Other Programs and then pick Word (be sure that the box is not checked beside “Always use the selected program to open these files”).You will be asked what kind of conversion to do. Select “Text Only.”Your listing will look something like this:------------------------------------------------------------------------------------------------ The MEANS Procedure Variable Minimum Maximum Skewness Kurtosis N ??????????????????????????????????????????????????????????????????????????????? MPG 9.0000000 33.0000000 -0.1604527 -0.1027140 100Not very nicely formatted, is it? Select the entire document (Ctrl-A) and then change the font to SAS Monospace and the font size to 8 point. Of course, the SAS Monospace font must be installed for you to be able to select it. It is installed when SAS is installed on your computer.------------------------------------------------------------------------------------------------ The MEANS Procedure Variable Minimum Maximum Skewness Kurtosis N ??????????????????????????????????????????????????????????????????????????????? MPG 9.0000000 33.0000000 -0.1604527 -0.1027140 100That is much better, isn’t it?Often SAS output lines are too long to fit in a Word document with one inch margins, and when the lines wrap the formatting is destroyed. To avoid this, from Page Layout, Margins, select Narrow (one half inch all around).Now you should define a style that will make it easier to do this on the next listing. While holding down the Alt, Ctrl, and Shift keys, hit the S key to open the Styles window. Click the New Style icon in the lower left corner. Name the new style “SAS.” Select 8 point SAS Monospace font. Save the new style.In the future, to apply this style, just highlight the paragraphs to be affected, open the style window, and select SAS.Be sure to save the listing as a Word document so your formatting changes will be saved: File, Save As, Save as type: Word document (*.docx).Back to My SAS Help Page ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download