Desktop productivity for business analysts and programmers

SAS Enterprise Guide Email Multiple Attachments

Reply
New Contributor
Posts: 4

SAS Enterprise Guide Email Multiple Attachments

My company has recently switched to SAS Enterprise Guide, and one of my responsibilities is to email out large batches of emails with multiple attachments. I know that to attach .xlsx files you need to add the line

content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" lrecl=32000

 to your attach= statement.

 

I have verified that each individual attachment works but when I try to send all attachments at once, only the last one attached can be opened. Every other attachment is corrupted and can't be viewed. Any help would be appreciated, thank you.

 

%macro emaildata (to_address, attachments);
 Filename output email;
 data _null_;
	file output
	to = (&to_address.)
	subject = "Subject Line"
	attach = (&attachments. content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" lrecl=32000);

 put "text."; 

run;
%mend emaildata;


/* Test */
%emaildata ('recipient', "&attach1." "&attach2." "&attach3." "&attach4." "&attach5." "&attach6.");
Valued Guide
Posts: 2,111

Re: SAS Enterprise Guide Email Multiple Attachments

[ Edited ]

Cole,

 

I don't have an answer to using the macro. 

 

Sometimes EGuide works better if you use its tools.  If you have a file to send, right click on it and select 'send to' and then 'email as a step in the project'.  Once you've added one file, you can add others.  It's pretty flexible about sending data and reports.

 

{Added}.  You need to do some setup in tools--> options and the mail is sent from your pc, not from the server.

Ask a Question
Discussion stats
  • 1 reply
  • 106 views
  • 0 likes
  • 2 in conversation