<?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: SAS email won't attach PowerPoint slide in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992046#M380403</link>
    <description>&lt;P&gt;Thank you very much TOM. The FCOPY with RECFM=f did work; however PowerPoint repair warning keeps coming. When I use RECFM=n, the warning is no longer coming.&amp;nbsp; Here is my script that worked well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;=pptpath;&lt;/P&gt;
&lt;P&gt;/*Window explorer: FILE SIZE=1495 KB*/&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%let pptlocal=....\COPIED_TEST_Report.pptx;&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=f lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=f lrecl=512;&lt;/P&gt;
&lt;P&gt;/* Copy PPTX */&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;rc=fcopy('src','dst');&lt;BR /&gt;put "FCOPY RC=" rc;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/*Log: FCOPY RC=0*/&lt;/P&gt;
&lt;P&gt;/*verify copied file*/&lt;BR /&gt;filename chk "&amp;amp;pptlocal";&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;fid=fopen('chk');&lt;/P&gt;
&lt;P&gt;if fid &amp;gt; 0 then do;&lt;BR /&gt;size=finfo(fid,'File Size (bytes)');&lt;BR /&gt;put 'COPIED FILE SIZE=' size;&lt;BR /&gt;rc=fclose(fid);&lt;BR /&gt;end;&lt;BR /&gt;else put 'FILE COULD NOT BE OPENED';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/*Log: COPIED FILE SIZE=1495 KB*/&lt;/P&gt;
&lt;P&gt;filename chk "&amp;amp;pptlocal";&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;filename mymail email&lt;BR /&gt;to = "my.email@com"&lt;BR /&gt;subject = "Monthly Performance Deck"&lt;BR /&gt;&lt;BR /&gt;attach = (&lt;BR /&gt;"&amp;amp;pptlocal"&lt;BR /&gt;content_type="application/pptx"&lt;BR /&gt;)&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;/* Write the email body */&lt;BR /&gt;data _null_;&lt;BR /&gt;file mymail;&lt;BR /&gt;put "Hello,";&lt;BR /&gt;put ;&lt;BR /&gt;put "Please find the attached PowerPoint presentation for your review.";&lt;BR /&gt;put ;&lt;BR /&gt;put "Best regards,";&lt;BR /&gt;put "CD Team";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Conclusion:&lt;/P&gt;
&lt;P&gt;Using FCOPY with recfm=f:&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=f lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=f lrecl=512;&lt;/P&gt;
&lt;P&gt;I successfully produced a full-sized PPTX copy (1,495 KB). The emailed attachment is no longer truncated and opens successfully after repair. The original issue of receiving a 514–579 byte attachment appears resolved. The remaining issue is that PowerPoint still displays a repair prompt before opening the emailed PPTX.&lt;/P&gt;
&lt;P&gt;Question&lt;BR /&gt;Given that:&lt;BR /&gt;The original and copied PPTX files are both math 1,495 KB&lt;BR /&gt;The copied file opens normally outside Outlook&lt;BR /&gt;The emailed attachment is no longer truncated&lt;BR /&gt;PowerPoint still performs a repair when opening the attachment&lt;BR /&gt;It did work nicely except repair warning&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I use RECFM=N option no longer receives warning.&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=n lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=n lrecl=512;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2026 13:09:01 GMT</pubDate>
    <dc:creator>bijayadhikar</dc:creator>
    <dc:date>2026-08-13T13:09:01Z</dc:date>
    <item>
      <title>SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992011#M380393</link>
      <description>&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;
&lt;DIV&gt;I generated a PowerPoint presentation (&lt;CODE&gt;.pptx&lt;/CODE&gt;) using the ODS PowerPoint destination and properly closed it with:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;ods powerpoint close;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;I use SAS 9.4 with EG 8.5. The PPTX file is created successfully and opens normally from Windows Explorer. The file size on disk is approximately &lt;STRONG&gt;1.5 MB (1,495 KB)&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;However, when I send the same PPTX as an email attachment using the SAS Email engine, the recipient receives a much smaller file (approximately &lt;STRONG&gt;514 bytes&lt;/STRONG&gt;). When they try to open it, PowerPoint prompts to repair the file and then fails to open it.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;There are no errors in the SAS log.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Troubleshooting completed:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;SAS can locate the file (&lt;CODE&gt;FILEEXIST=1&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;SAS can read the file and reports the correct size (~1.5 MB).&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The PPTX opens normally from Windows Explorer.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The network path is valid and accessible.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;PDF files attached from the same folder and using the same email code work correctly.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;CODE&gt;FCOPY&lt;/CODE&gt; successfully copies the PPTX to a local WORK directory (&lt;CODE&gt;RC=0&lt;/CODE&gt;).&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Based on these tests, it appears the issue may be related to how the SAS Email engine is attaching &lt;CODE&gt;.pptx&lt;/CODE&gt; files rather than a problem with the PowerPoint file itself.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Has anyone experienced a similar issue with &lt;CODE&gt;.pptx&lt;/CODE&gt; attachments being truncated or corrupted when sent through the SAS Email engine? If so, were there any recommended workarounds or configuration changes?&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Aug 2026 15:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992011#M380393</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-12T15:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992016#M380394</link>
      <description>&lt;P&gt;You might try something like zipping the pptx file before emailing it, if you suspect it's getting corrupted by SAS or your mail server.&amp;nbsp; &amp;nbsp;Maybe that's a silly idea, since pptx is literally a zip file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try changing the extension on the .pptx to something neutral like .txt in case your email system has blocker on sending .pptx files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have IT support, you might want to check with them to see if they can see if the mail server logs say anything interesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess it's possible SAS somehow munged the file during upload.&amp;nbsp; If you do a simple .pptx with just one slide from PROC PRINT, does the email work?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2026 17:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992016#M380394</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2026-08-12T17:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992019#M380395</link>
      <description>&lt;P&gt;The usual way to add an email attachment that is for a specific application is to use the CONTENT_TYPE option. Try something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mymail email "My.Name@MyWork.com"
         subject="PPT Test"
         attach=("MyPPT.pptx"  content_type="application/pptx");

data _null_;
   file mymail;
   put 'Hi Me,';
   put 'This is a test.';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2026 20:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992019#M380395</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2026-08-12T20:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992021#M380396</link>
      <description>&lt;P&gt;If you copy a BINARY file as TEXT it can become corrupted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please share the code you used for FCOPY , in particular how you defined the two FILEREFs used.&amp;nbsp; Make sure your are not using RECFM=V. Using RECFM=F is best, RECFM=N might work also.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2026 20:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992021#M380396</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-08-12T20:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992025#M380397</link>
      <description>&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;ods powerpoint close;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;ods listing;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename mymail email&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; to = "my.email@com"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; subject = "PPTX Attachment Test"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; attach = "&amp;amp;pptpath";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; file mymail;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Hello,";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Please find the attached PowerPoint presentation for your review.";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Best regards,";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "CD Team";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;FONT size="3"&gt;Email sent successfully&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;FONT size="3"&gt;PPTX attachment received&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;FONT size="3"&gt;Attachment size approximately 514-579 bytes&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;FONT size="3"&gt;PowerPoint attempts repair and then fails to open&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;FCOPY Test&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;%let pptlocal=%sysfunc(pathname(work))\COPIED_TEST_Report.pptx;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename src "&amp;amp;pptpath";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename dst "&amp;amp;pptlocal";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; rc=fcopy('src','dst');&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put rc=;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;Log rc=0&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;&lt;FONT size="3"&gt;Verify Local Copy Exists&lt;/FONT&gt;&lt;/H3&gt;
&lt;DIV class="___77lcry0 f10pi13n"&gt;
&lt;DIV class="___1hewfwb f10pi13n f7oukh6 f5p0z4x" tabindex="0" role="group" aria-label="Code Preview"&gt;
&lt;DIV class="scriptor-component-code-block scriptor-codeblock-virtualized ___1o1nnyo f10pi13n fjp19u1 f3rmtva f22iagw f1vx9l62 f1kijzfu f5ogflp f1hqa2wf f1f09k3d finvdd3 fzkkow9 fcdblym fg706s2 fjik90z fowmxj1 fu36uob f1te0ok0 f1mz5xvh fw8lh99 f10vg012" tabindex="-1"&gt;
&lt;DIV class="___77lcry0 f10pi13n"&gt;
&lt;DIV class="rrd10u0 fui-AriaLive__assertive" aria-live="assertive"&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename test "&amp;amp;pptlocal";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; fid = fopen('test');&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; if fid &amp;gt; 0 then do;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put 'EXISTS=1';&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; rc = fclose(fid);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; end;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; else put 'EXISTS=0';&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="rrd10u0 fui-AriaLive__polite" aria-live="polite"&gt;&lt;FONT size="3"&gt;Log:&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;EXISTS=1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="___1ludryd f113wtx2 fh7la5i fj25m7a f3rmtva faeg6wf"&gt;
&lt;DIV class="___1q9qq0z f22iagw f1063pyq f122n59 fly5x3f"&gt;
&lt;DIV class="___1uf6361 fz7g6wx"&gt;
&lt;DIV class="fui-Overflow ___1gjvvcj fyfkpbf f10570jf f22iagw f9c4gz4 f1063pyq f122n59"&gt;
&lt;DIV class="___1dczkdo f22iagw f1nari41 f9c4gz4 fsyhess" data-overflow-item=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="___1dczkdo f22iagw f1nari41 f9c4gz4 fsyhess" data-overflow-item=""&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;Attach Local Copy Instead&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename mymail email&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; to = "my.email@com"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; subject = "Monthly Performance Deck"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; attach = "&amp;amp;pptlocal";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; file mymail;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Hello,";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Please find the attached PowerPoint presentation.";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "Best regards,";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put "CD Team";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="___1dczkdo f22iagw f1nari41 f9c4gz4 fsyhess" data-overflow-item=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="___1dczkdo f22iagw f1nari41 f9c4gz4 fsyhess" data-overflow-item=""&gt;
&lt;DIV&gt;
&lt;H3&gt;&lt;FONT size="3"&gt;Additional Validation&lt;/FONT&gt;&lt;/H3&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;FONT size="3"&gt;I verified that SAS can read the original PPTX and reports the expected file size.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;filename chk "&amp;amp;pptpath";&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;data _null_;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; fid=fopen('chk');&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; if fid then do;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; size=finfo(fid,'File Size (bytes)');&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; put size=;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; rc=fclose(fid);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt; end;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;Log: size=1456840&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="___1dczkdo f22iagw f1nari41 f9c4gz4 fsyhess" data-overflow-item=""&gt;
&lt;DIV id="language-badge" class="fui-Badge r1iycov ___qw36yw0 f17fgpbq frvgh55 f1996nqw f1ctqxl6 f11d4kpn f68mrw8 f7pw515 frpde29 fw35ms5 fqe3srh" aria-label="SAS"&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;The original PPTX also opens normally from Windows Explorer.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;No &lt;CODE&gt;RECFM=&lt;/CODE&gt; option was specified.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;No &lt;CODE&gt;RECFM=&lt;/CODE&gt; option was specified.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;FONT size="3"&gt;Therefore the filerefs are using the default host settings.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;FONT size="3"&gt;I am &lt;STRONG&gt;not&lt;/STRONG&gt; using:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;recfm=v&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;recfm=f&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;recfm=n&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;PPTX was copied as text&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Aug 2026 22:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992025#M380397</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-12T22:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992026#M380398</link>
      <description>Sorry for typo. PPTX was not copied as text.</description>
      <pubDate>Wed, 12 Aug 2026 22:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992026#M380398</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-12T22:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992028#M380399</link>
      <description>Another test: The file that SAS copied likely not a valid PPTX copy. Original PPTX  = 1,456,840 bytes&lt;BR /&gt;Copied PPTX    = 109 bytes&lt;BR /&gt;ZIP file       = 146 bytes. This size which is not remotely close to a valid PPTX.&lt;BR /&gt;&lt;BR /&gt;Any thoughts appreciated.</description>
      <pubDate>Wed, 12 Aug 2026 22:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992028#M380399</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-12T22:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992030#M380400</link>
      <description>&lt;P&gt;This worked fine for me. I created a test PPTX in Powerpoint, saved it to a SAS server folder, ran the below program. I just double-clicked on the email attachment and the Powerpoint opened as I expected:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mymail email "My.Name@MyOrg.com"
         subject="PPTX Test"
         attach=("TestPPTX.pptx"  content_type="application/pptx" 
         );

data _null_;
   file mymail;
   put 'Hi Me,';
   put 'This is a test.';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is the test email:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1786581079707.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/116972i76CB6091A9917C84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1786581079707.png" alt="SASKiwi_0-1786581079707.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SASKiwi_0-1786581079707.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2026 00:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992030#M380400</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2026-08-13T00:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992034#M380401</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/346623"&gt;@bijayadhikar&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Sorry for typo. PPTX was not copied as text.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why do you think that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try being specific in how you want SAS to read and write the files when copying.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename src "&amp;amp;pptpath" recfm=f lrecl=512;
filename dst "&amp;amp;pptlocal" recfm=f lrecl=512;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also make sure to tell the email process what type of file it is attaching, this will help the recipient know what application to use to open the file.&amp;nbsp; It will also help with email filters.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mymail email
  to = "my.email@com"
  subject = "Monthly Performance Deck"
  attach = ("&amp;amp;pptlocal" content_type="application/pptx")
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2026 03:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992034#M380401</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-08-13T03:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992044#M380402</link>
      <description>&lt;P&gt;1) Try this code&lt;/P&gt;
&lt;PRE&gt;filename src "&amp;amp;pptpath";
filename dst "&amp;amp;pptlocal";
 -------&amp;gt;
filename src "&amp;amp;pptpath"  &lt;STRONG&gt;recfm=n&lt;/STRONG&gt;;
filename dst "&amp;amp;pptlocal"  &lt;STRONG&gt;recfm=n&lt;/STRONG&gt;;
 &lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Try RENAME() function:&lt;/P&gt;
&lt;PRE&gt;data _null_;
rc=&lt;STRONG&gt;rename&lt;/STRONG&gt;("c:\old\x.pptx","c:\new\x.pptx",'file');
put rc= ;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2026 10:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992044#M380402</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-08-13T10:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992046#M380403</link>
      <description>&lt;P&gt;Thank you very much TOM. The FCOPY with RECFM=f did work; however PowerPoint repair warning keeps coming. When I use RECFM=n, the warning is no longer coming.&amp;nbsp; Here is my script that worked well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;=pptpath;&lt;/P&gt;
&lt;P&gt;/*Window explorer: FILE SIZE=1495 KB*/&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%let pptlocal=....\COPIED_TEST_Report.pptx;&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=f lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=f lrecl=512;&lt;/P&gt;
&lt;P&gt;/* Copy PPTX */&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;rc=fcopy('src','dst');&lt;BR /&gt;put "FCOPY RC=" rc;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/*Log: FCOPY RC=0*/&lt;/P&gt;
&lt;P&gt;/*verify copied file*/&lt;BR /&gt;filename chk "&amp;amp;pptlocal";&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;fid=fopen('chk');&lt;/P&gt;
&lt;P&gt;if fid &amp;gt; 0 then do;&lt;BR /&gt;size=finfo(fid,'File Size (bytes)');&lt;BR /&gt;put 'COPIED FILE SIZE=' size;&lt;BR /&gt;rc=fclose(fid);&lt;BR /&gt;end;&lt;BR /&gt;else put 'FILE COULD NOT BE OPENED';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/*Log: COPIED FILE SIZE=1495 KB*/&lt;/P&gt;
&lt;P&gt;filename chk "&amp;amp;pptlocal";&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;filename mymail email&lt;BR /&gt;to = "my.email@com"&lt;BR /&gt;subject = "Monthly Performance Deck"&lt;BR /&gt;&lt;BR /&gt;attach = (&lt;BR /&gt;"&amp;amp;pptlocal"&lt;BR /&gt;content_type="application/pptx"&lt;BR /&gt;)&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;/* Write the email body */&lt;BR /&gt;data _null_;&lt;BR /&gt;file mymail;&lt;BR /&gt;put "Hello,";&lt;BR /&gt;put ;&lt;BR /&gt;put "Please find the attached PowerPoint presentation for your review.";&lt;BR /&gt;put ;&lt;BR /&gt;put "Best regards,";&lt;BR /&gt;put "CD Team";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Conclusion:&lt;/P&gt;
&lt;P&gt;Using FCOPY with recfm=f:&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=f lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=f lrecl=512;&lt;/P&gt;
&lt;P&gt;I successfully produced a full-sized PPTX copy (1,495 KB). The emailed attachment is no longer truncated and opens successfully after repair. The original issue of receiving a 514–579 byte attachment appears resolved. The remaining issue is that PowerPoint still displays a repair prompt before opening the emailed PPTX.&lt;/P&gt;
&lt;P&gt;Question&lt;BR /&gt;Given that:&lt;BR /&gt;The original and copied PPTX files are both math 1,495 KB&lt;BR /&gt;The copied file opens normally outside Outlook&lt;BR /&gt;The emailed attachment is no longer truncated&lt;BR /&gt;PowerPoint still performs a repair when opening the attachment&lt;BR /&gt;It did work nicely except repair warning&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I use RECFM=N option no longer receives warning.&lt;/P&gt;
&lt;P&gt;filename src "&amp;amp;pptpath" recfm=n lrecl=512;&lt;BR /&gt;filename dst "&amp;amp;pptlocal" recfm=n lrecl=512;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2026 13:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992046#M380403</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-13T13:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS email won't attach PowerPoint slide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992047#M380404</link>
      <description>&lt;P&gt;Thank you Ksharp. Appreciated for help., I did not try renaming but using recfm=n&amp;nbsp; stopped PowerPoint repair warning.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;filename src "&amp;amp;pptpath"  &lt;STRONG&gt;recfm=n&lt;/STRONG&gt;;
filename dst "&amp;amp;pptlocal"  &lt;STRONG&gt;recfm=n&lt;/STRONG&gt;;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2026 13:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-email-won-t-attach-PowerPoint-slide/m-p/992047#M380404</guid>
      <dc:creator>bijayadhikar</dc:creator>
      <dc:date>2026-08-13T13:11:38Z</dc:date>
    </item>
  </channel>
</rss>

