<?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 Is there a way to reference macros in outmail in sas for attachments (XLS) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581582#M165311</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to reference macros in outmail in sas for:&lt;/P&gt;&lt;P&gt;path name where the attachment is kept?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Is there also a way to reference a macro for email? I have multiple users running the report and would rather not have the user have to scroll down to hardcode their own email if this can be done 'up front' in a let statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*EMAIL*/&lt;/P&gt;&lt;P&gt;%let fileref = 'file name' &amp;lt;= this dynamically changes/user sets　&lt;/P&gt;&lt;P&gt;%let&amp;nbsp;path = 'sas/folder/data' &amp;lt;= where data/information is stored. path is changed by user (person running report saves data to their work folder)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;filename OUTMAIL email&lt;/P&gt;&lt;P&gt;subject = '(&amp;amp;fileref) Report'&lt;/P&gt;&lt;P&gt;from = 'me@mail.com' &amp;lt;-can a macro be used here as well so a user doesn't scroll down to hardcode an email value?&lt;/P&gt;&lt;P&gt;to = them@mail.com'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attach =('/&amp;amp;path/Report.xls' &amp;lt;-can a macro be used for a path so a user doesn't scroll down to hardcode?&lt;/P&gt;&lt;P&gt;content_type='application/xls');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 19:53:13 GMT</pubDate>
    <dc:creator>Klakola</dc:creator>
    <dc:date>2019-08-15T19:53:13Z</dc:date>
    <item>
      <title>Is there a way to reference macros in outmail in sas for attachments (XLS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581582#M165311</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to reference macros in outmail in sas for:&lt;/P&gt;&lt;P&gt;path name where the attachment is kept?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Is there also a way to reference a macro for email? I have multiple users running the report and would rather not have the user have to scroll down to hardcode their own email if this can be done 'up front' in a let statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*EMAIL*/&lt;/P&gt;&lt;P&gt;%let fileref = 'file name' &amp;lt;= this dynamically changes/user sets　&lt;/P&gt;&lt;P&gt;%let&amp;nbsp;path = 'sas/folder/data' &amp;lt;= where data/information is stored. path is changed by user (person running report saves data to their work folder)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;filename OUTMAIL email&lt;/P&gt;&lt;P&gt;subject = '(&amp;amp;fileref) Report'&lt;/P&gt;&lt;P&gt;from = 'me@mail.com' &amp;lt;-can a macro be used here as well so a user doesn't scroll down to hardcode an email value?&lt;/P&gt;&lt;P&gt;to = them@mail.com'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attach =('/&amp;amp;path/Report.xls' &amp;lt;-can a macro be used for a path so a user doesn't scroll down to hardcode?&lt;/P&gt;&lt;P&gt;content_type='application/xls');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 19:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581582#M165311</guid>
      <dc:creator>Klakola</dc:creator>
      <dc:date>2019-08-15T19:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to reference macros in outmail in sas for attachments (XLS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581590#M165313</link>
      <description>&lt;P&gt;Macro triggers (&amp;amp; and %) are not resolved within single quotes. Use double quotes whenever you need macro triggers to be resolved.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 20:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581590#M165313</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-15T20:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to reference macros in outmail in sas for attachments (XLS)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581618#M165327</link>
      <description>&lt;P&gt;And you may not want the quotes in the %let assignments for those macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use&lt;/P&gt;
&lt;P&gt;%let&amp;nbsp;path = 'sas/folder/data'&lt;/P&gt;
&lt;P&gt;then when this resolves (assuming you replace the single quotes to double quotes so it can resolve) then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;attach =("/&amp;amp;path/Report.xls"&lt;/P&gt;
&lt;P&gt;would resolve to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;attach =("/&lt;FONT color="#00ff00" size="4"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;sas/folder/data&lt;FONT color="#00ff00" size="4"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;/Report.xls"&lt;/P&gt;
&lt;P&gt;which is almost certainly not the correct path. Color and font changed to indicate the probable issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro variables are always text, so you don't need the quotes to tell the processor that you want a character value. The quotes become part of the value.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 22:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-reference-macros-in-outmail-in-sas-for/m-p/581618#M165327</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-15T22:24:45Z</dc:date>
    </item>
  </channel>
</rss>

