<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS ODS Graphics to MS Word Advice Wanted in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-to-MS-Word-Advice-Wanted/m-p/364701#M12666</link>
    <description>&lt;P&gt;Looking for general best practices advice (or papers) on&amp;nbsp; formats/options to use for outputing ODS Graphics in a format that will nicely cut-and-paste into MS Word.&amp;nbsp; Big picture is I will end up writing a stored process that makes some graphs, and usually they are just for viewing in a browser, but sometimes users want to copy one or two into a&amp;nbsp; Word report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using 9.4M3 on linux server.&amp;nbsp; Graphs will have some semi-transparent layers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems like the most popular formats for Word would be EMF or PNG.&amp;nbsp; Since I suspect users will want to adjust the size of the charts, my initial thought is use ODS RTF with image_fmt=EMF, since it's a vector plot.&amp;nbsp; But from browsing online, looks like many people just use image_fmt=png for Word?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had hoped using image_fmt=EMF might make the image editable in MS Word.&amp;nbsp; We've got Office 2010 on Win 7 PCs, and when I open a file in Word and use Edit-&amp;gt;Picture to covert it into a MS Drawing Object, it disappears.&amp;nbsp; This isn't the end of the world, however, my memory is editing in Word always made things a little bit wonky anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think users will likely want to edit titles/footnotes when they insert them into&amp;nbsp;a report, so my thought is to use RTF options: bodytitle nogtitle nogfootnote.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't played yet with ODS Powerpoint, but looks like that uses PNG by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose another option is to just stick with ODS HTML (which is using image_fmt=PNG), and just increase the DPI and tell users to use the browser to download any images they want.&amp;nbsp; But since I don't want the titles/footnotes in the image, they would be lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current sample code is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;footnote1 "My Footnote" ;

title1 "My EMF Plot" ;
ods graphics/ reset=all
              border=off
              width=6.0 in
              imagefmt=EMF
;

ods rtf file="&amp;amp;outdir/EMF.rtf" bodytitle nogtitle nogfootnote style=statistical;
proc sgplot data=sashelp.prdsale ;
  vbox actual / category=month ;
run ;
ods rtf close ;
title1;


title1 "My PNG Plot" ;
ods graphics/ reset=all
              border=off
              width=6.0 in
              imagefmt=png              
;

ods rtf file="&amp;amp;outdir/PNG.rtf" image_dpi=200 bodytitle nogtitle nogfootnote style=statistical;
proc sgplot data=sashelp.prdsale ;
  vbox actual / category=month ;
run ;
ods rtf close ;

title1 ;
footnote1 ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for recommendations.&amp;nbsp; I've been doing a lot of ODS HTML and PDF&amp;nbsp;for the past several years, it's been a good while since I've really thought about output for MS Word.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Q.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 19:35:59 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2017-06-06T19:35:59Z</dc:date>
    <item>
      <title>SAS ODS Graphics to MS Word Advice Wanted</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-to-MS-Word-Advice-Wanted/m-p/364701#M12666</link>
      <description>&lt;P&gt;Looking for general best practices advice (or papers) on&amp;nbsp; formats/options to use for outputing ODS Graphics in a format that will nicely cut-and-paste into MS Word.&amp;nbsp; Big picture is I will end up writing a stored process that makes some graphs, and usually they are just for viewing in a browser, but sometimes users want to copy one or two into a&amp;nbsp; Word report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using 9.4M3 on linux server.&amp;nbsp; Graphs will have some semi-transparent layers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems like the most popular formats for Word would be EMF or PNG.&amp;nbsp; Since I suspect users will want to adjust the size of the charts, my initial thought is use ODS RTF with image_fmt=EMF, since it's a vector plot.&amp;nbsp; But from browsing online, looks like many people just use image_fmt=png for Word?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had hoped using image_fmt=EMF might make the image editable in MS Word.&amp;nbsp; We've got Office 2010 on Win 7 PCs, and when I open a file in Word and use Edit-&amp;gt;Picture to covert it into a MS Drawing Object, it disappears.&amp;nbsp; This isn't the end of the world, however, my memory is editing in Word always made things a little bit wonky anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think users will likely want to edit titles/footnotes when they insert them into&amp;nbsp;a report, so my thought is to use RTF options: bodytitle nogtitle nogfootnote.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't played yet with ODS Powerpoint, but looks like that uses PNG by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose another option is to just stick with ODS HTML (which is using image_fmt=PNG), and just increase the DPI and tell users to use the browser to download any images they want.&amp;nbsp; But since I don't want the titles/footnotes in the image, they would be lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current sample code is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;footnote1 "My Footnote" ;

title1 "My EMF Plot" ;
ods graphics/ reset=all
              border=off
              width=6.0 in
              imagefmt=EMF
;

ods rtf file="&amp;amp;outdir/EMF.rtf" bodytitle nogtitle nogfootnote style=statistical;
proc sgplot data=sashelp.prdsale ;
  vbox actual / category=month ;
run ;
ods rtf close ;
title1;


title1 "My PNG Plot" ;
ods graphics/ reset=all
              border=off
              width=6.0 in
              imagefmt=png              
;

ods rtf file="&amp;amp;outdir/PNG.rtf" image_dpi=200 bodytitle nogtitle nogfootnote style=statistical;
proc sgplot data=sashelp.prdsale ;
  vbox actual / category=month ;
run ;
ods rtf close ;

title1 ;
footnote1 ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for recommendations.&amp;nbsp; I've been doing a lot of ODS HTML and PDF&amp;nbsp;for the past several years, it's been a good while since I've really thought about output for MS Word.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Q.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-to-MS-Word-Advice-Wanted/m-p/364701#M12666</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-06T19:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics to MS Word Advice Wanted</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-to-MS-Word-Advice-Wanted/m-p/364719#M12667</link>
      <description>&lt;P&gt;OutputFmt=EMF is supported. &amp;nbsp;However, RTF files are bigger than similar DOCX files. &amp;nbsp;The EMF output is is vector, and scalable. &amp;nbsp;But it is not always the best looking. &amp;nbsp;Some transparency and image features are not fully supported in EMF, and so you get a PNG output anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I prefer PNG if file size and large magnification is not an issue. &amp;nbsp;I normally render my graphs for inclusion in books etc at 300 dpi. &amp;nbsp;You can go higher (600dpi), but any higher may cause "out of memory" issues.&amp;nbsp; &amp;nbsp;These can be addressed by &lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Configuration-for-high-resolution-png-graphics/m-p/356801#M12403" target="_blank"&gt;increasing Java memory&lt;/A&gt;. &amp;nbsp;I suggest rendering the graph at the size expected in the document. &amp;nbsp;That will ensure text is readable. &amp;nbsp;If you want to place a graph in 4" width of the page, render it with WIDTH=4in, DPI=300 or higher.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 13:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-to-MS-Word-Advice-Wanted/m-p/364719#M12667</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-06-12T13:29:54Z</dc:date>
    </item>
  </channel>
</rss>

