EmailDataBaseObject Add date field to the file name when attached to email

scopes456

Registered User.
Local time
Today, 14:41
Joined
Feb 13, 2013
Messages
88
i have a report (LOG) that i can attach to an email using EmailDataBaseObject Macro. When the macro is used attachment name "log.pdf" is used since the report is called log and in pdf format. On the report it has a date field (date_log) i would like the date to be part of the name when the file is attached. instead of just "log.pdf" it will be "log-Aug 6 2016. pdf" .
 
Generally speaking you can't with a macro. You'd use OutputTo in VBA to create a file, where you can specify the name. Then Outlook automation to send the email with the attachment.

I suppose you could copy the report and give it the desired name, then email the copy, but I wouldn't go that way.
 
pbaldy can you give me an example how to use "OutputTo" VBA. Listed is the name of the report and the field I would like to attached so it can output to " LOG-AUG 11-2016.PDF"

Report Name - LOG
Log_Date - Date Field.
 

Users who are viewing this thread

Back
Top Bottom