The SAS Output Delivery System and reporting techniques

Problem sending Windows shortcut's via email

Reply
N/A
Posts: 0

Problem sending Windows shortcut's via email

Hi everyone, we use email to send reports to people and because of the size of some of them we are looking to instead send out a shorcut to the file. The below code is a snippet of what we use to send a file out which I've changed to attach a windows shortcut, but, while it attaches the file the shortcut doesn't work. When I did a properties on the attachment it is only 551 bytes, if I manually attach the same shortcut to an email the attachment is 1153 bytes. Has anyone come across this problem before, and more importantly, know what is wrong? Smiley Happy

Thanks.

filename SendMail email to=(&macvar.)
subject="SAS Processing : Duplicate Party Records Report"
attach=("\\svrbu3file\shared\public\Inf_Mgt\Projects\Data Quality\Reporting\Exception Reports\Shortcut to Issue 158 - Duplicate party records.xls.lnk")
type='Text/Html' ;

ods html
style=SasWeb
body=SendMail
rs=none;
Frequent Contributor
Posts: 91

Re: Problem sending Windows shortcut's via email

Posted in reply to deleted_user
Try adding content_type to the attach= options. I believe that the shortcut (.lnk) is actually a binary file. I've had success in the past referring to binary files as image files. So try something like:
filename SendMail email to=(&macvar.)
subject="SAS Processing : Duplicate Party Records Report"
attach=("\\svrbu3file\shared\public\Inf_Mgt\Projects\Data Quality\Reporting\Exception Reports\Shortcut to Issue 158 - Duplicate party records.xls.lnk" content_type="IMAGE/GIF")
type='Text/Html' ;
Super Contributor
Posts: 292

Re: Problem sending Windows shortcut's via email

Rather than attach a file or shortcut, I build a hot link into the email message. Code below.

filename mail email ' '
from=("me@company.ca")
to=("you@company.ca")
subject="Sales Report for %sysfunc(datetime(),datetime13.)";

data _null_;

file mail;

put "auto email report, brought to you by SAS®";
put " ";
put "Double click on the link below to view or print";
put " ";
put "\\Drive\Directory\SubDirectory\SalesReport.pdf";
put " ";
run; Message was edited by: Bill
N/A
Posts: 0

Re: Problem sending Windows shortcut's via email

Posted in reply to deleted_user
Advoss : that fixed the problem. Thanks.

Bill : Originally I was going to use hotlinks but it didn't like spaces in the filename or path, it would end the link at the character before the space. I was using :

a href="file:\\svrbu3file\shared\public\Inf_Mgt\Projects\Data Quality\Reporting\Exception Reports\Issue 158 - Duplicate party records.xls">S:\public\Inf_Mgt\Projects\Data Quality\Reporting\Exception Reports\Issue 158 - Duplicate party records.xls';

Output;
Super Contributor
Posts: 292

Re: Problem sending Windows shortcut's via email

Posted in reply to deleted_user
If there are blanks in the string, you can fill them with %20, e.g. Issue 158 becomes Issue%20158.
Ask a Question
Discussion stats
  • 4 replies
  • 151 views
  • 0 likes
  • 3 in conversation