Hello
I'm having a slight issue with attaching a file to my macro mail.
The culprit as far as I am aware my dynamic date name function: &today
This is my attachment code:
attach=("\\F:\DI\WR\WeeklyReport_&today" content_type="application/xlsx");
For which I receive this error: ERROR: Error opening attachment file
Physical file does not exist,
I've tried entering the file name exactly WITHOUT using my &today macro and IT DID WORK.
I've also tried adding .xlsx to the end of the target attachment string:
attach=("\\F:\DI\WR\WeeklyReport_&today".xlsx content_type="application/xlsx");
This however did not help and gave me the same error (as If SAS did not detect the full space between &today and xlsm)
The only half-way solution that I found was adding a star (*) to the attachment target string, which would indeed attach the file however in text format and not xlsm.
attach=("\\F:\DI\WR\WeeklyReport_&today*" content_type="application/xlsx");
Any ideas would be hugely appreciated.
Michael