<?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 Re: proc odstext does not apply font size in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/849999#M335971</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Is there a reason that you're using ODS HTML3 for your example? I believe the default in ODS HTML3 was to translate your font size to a "relative" number that would then be displayed in the browser based on the relative size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; So taking email out of the picture and running just the PROC ODSTEXT to ODS HTML3, I also get the font changed to size 3.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1671156273362.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78605iB0AD3581B67742E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1671156273362.png" alt="Cynthia_sas_0-1671156273362.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, switching to either "regular" ODS HTML or ODS HTML4 or ODS HTML5, I get the 11pt specified, as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS HTML4:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1671156460035.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78606i52BC47103AA780EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1671156460035.png" alt="Cynthia_sas_1-1671156460035.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS HTML5:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1671156482323.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78607i01175A45DC47458E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1671156482323.png" alt="Cynthia_sas_2-1671156482323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I ran:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html5(id=5) path='c:\temp' file='odstext_ht5.html' style=htmlblue;
ods html(id=4) path='c:\temp' file='odstext_ht4.html' style=htmlblue;
ods html3(id=3) path='c:\temp' file='odstext_ht3.html' style=htmlblue; 

proc odstext;
  p "Hi all,"    /  style=[fontsize=11pt fontfamily=Calibri];
run;

ods html3(id=3) close;
ods html(id=4) close;
ods html5(id=5) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I took email out of the picture and used style=htmlblue for all 3 output files. I would recommend switching away from ODS HTML3 and/or do your file as a PDF or RTF attachment, because both of those destinations expect text to be specified in font sizes, while HTML doesn't always expect absolute font sizes.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 02:10:32 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2022-12-16T02:10:32Z</dc:date>
    <item>
      <title>proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/849983#M335965</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Running this code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename EM email 
        to     ="cxxx"
        subject="Space Alert" 
        type   ='text/html';

ods html3 file=EM; 

proc odstext;
  p "Hi all,"    /  style=[fontsize=11pt fontfamily=Calibri];
run;

ods html3 close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The generated HTML result is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;p align="LEFT"&amp;gt;&amp;lt;font face="Calibri" size="3" color="#002288"&amp;gt;Hi all,&amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;which Outlook displays as 12pt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I get the correct size?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 01:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/849983#M335965</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-12-16T01:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/849999#M335971</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Is there a reason that you're using ODS HTML3 for your example? I believe the default in ODS HTML3 was to translate your font size to a "relative" number that would then be displayed in the browser based on the relative size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; So taking email out of the picture and running just the PROC ODSTEXT to ODS HTML3, I also get the font changed to size 3.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1671156273362.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78605iB0AD3581B67742E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1671156273362.png" alt="Cynthia_sas_0-1671156273362.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, switching to either "regular" ODS HTML or ODS HTML4 or ODS HTML5, I get the 11pt specified, as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS HTML4:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1671156460035.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78606i52BC47103AA780EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1671156460035.png" alt="Cynthia_sas_1-1671156460035.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ODS HTML5:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1671156482323.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78607i01175A45DC47458E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1671156482323.png" alt="Cynthia_sas_2-1671156482323.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I ran:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html5(id=5) path='c:\temp' file='odstext_ht5.html' style=htmlblue;
ods html(id=4) path='c:\temp' file='odstext_ht4.html' style=htmlblue;
ods html3(id=3) path='c:\temp' file='odstext_ht3.html' style=htmlblue; 

proc odstext;
  p "Hi all,"    /  style=[fontsize=11pt fontfamily=Calibri];
run;

ods html3(id=3) close;
ods html(id=4) close;
ods html5(id=5) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I took email out of the picture and used style=htmlblue for all 3 output files. I would recommend switching away from ODS HTML3 and/or do your file as a PDF or RTF attachment, because both of those destinations expect text to be specified in font sizes, while HTML doesn't always expect absolute font sizes.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 02:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/849999#M335971</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-12-16T02:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850188#M336030</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank for your reply.&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp;destination&amp;nbsp;&lt;STRONG&gt;html3&lt;/STRONG&gt; in a effort to get slightly more usable results in Outlook as advised in&amp;nbsp;&lt;A href="https://support.sas.com/kb/21/133.html" target="_blank"&gt;https://support.sas.com/kb/21/133.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Other destinations lose all their formatting in Outlook.&amp;nbsp;Destination&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;MSOffice2K&amp;nbsp;&lt;/STRONG&gt;adds random boxes everywhere.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, SAS seems to have stabilised its style syntax to omit underscores for all keywords?&amp;nbsp; fontsize= fontfamily= etc. Is that the case everywhere?&amp;nbsp;&lt;SPAN&gt;That's a relief tbh.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks, Chris&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2022 09:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850188#M336030</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-12-17T09:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850202#M336035</link>
      <description>Hi:&lt;BR /&gt;  The Outlook formatting being wonky is the reason I don't put HTML into the body of the message that I'm e-mailing. I much prefer to make my report/output using ODS PDF or ODS RTF, both of which have lovely formatting and font control and page control and then just attach that file to the email.&lt;BR /&gt;Cynthia&lt;BR /&gt;</description>
      <pubDate>Sat, 17 Dec 2022 15:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850202#M336035</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-12-17T15:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850276#M336052</link>
      <description>&lt;P&gt;Thanks Cynthia.&lt;/P&gt;
&lt;P&gt;Outlook switched from the IE renderer to the Word renderer 15 years ago, so it's disheartening that despite the plethora of html destinations, it is still unsupported even though it's the de facto corporate email tool.&lt;/P&gt;
&lt;P&gt;Disappointing too that my font specification are simply ignored. I guess I need to write the HTML report by hand.&lt;/P&gt;
&lt;P&gt;Thanks again for your always appreciated contribution! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 22:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850276#M336052</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-12-18T22:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850285#M336055</link>
      <description>&lt;P&gt;Would there be a template style like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style style1;
style usertext / fontfamily="Calibri" fontsize=11pt ;
style cellcontents / fontfamily="Calibri" fontsize=11pt ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;for&lt;EM&gt; proc odstext&lt;/EM&gt; text that would override&lt;STRONG&gt; size=3&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 02:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850285#M336055</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-12-19T02:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850550#M336140</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I played around with a few PROC TEMPLATE solutions, but ODS HTML3 always created relative font sizes. I think that was part of how HTML3 worked with the original in-line styles. However, the ODS HTMLCSS destination also produced HTML3 output, but with CSS style specified. So when I tried your original code just with ODS HTMLCSS, then I did get the style override used, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1671572286579.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78766iC2085B1843A6DAF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1671572286579.png" alt="Cynthia_sas_0-1671572286579.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Of course, there is still Microsoft Outlook to contend with. I don't know whether Outlook will respect the HTMLCSS type of style specification. There's a chance that it will. But, as you can see in the DOCTYPE, ODS HTMLCSS does produce HTML 3.2 version of HTML output.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850550#M336140</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-12-20T21:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850707#M336188</link>
      <description>&lt;P&gt;Thanks for this Cynthia.&lt;/P&gt;
&lt;P&gt;I wasn't even aware of this version of the HTML output destination.&lt;/P&gt;
&lt;P&gt;I gave it a go and sadly it's also badly received by Outlook .&lt;/P&gt;
&lt;P&gt;proc odstext text is alright (though line spacing is altered), but ods text=, because it generates tables, is displayed surrounded by black lines.&lt;/P&gt;
&lt;P&gt;It looks like the HTML has to be crafted manually.&lt;/P&gt;
&lt;P&gt;Thanks again for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 04:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850707#M336188</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-12-22T04:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc odstext does not apply font size</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850798#M336221</link>
      <description>Hi: You might try ODS CHTML, as your destination then. It produces absolutely bare bones HTML without any DOCTYPE so there's a possibility that Outlook won't urp all over it.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 22 Dec 2022 15:16:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-odstext-does-not-apply-font-size/m-p/850798#M336221</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-12-22T15:16:20Z</dc:date>
    </item>
  </channel>
</rss>

