Pre-Attach A File To An Email

Learn2010

Registered User.
Local time
Today, 01:56
Joined
Sep 15, 2010
Messages
415
I am using this code:

Private Sub btnSendWeekly_Click()
DoCmd.SendObject acSendReport, "rptWeekly", acformatPDF, "Larry.CurlyMoe@test.org", , , _
"Areas", "Please attach the file named AreaEmail.accdb located in C:\Areas\ folder and click the Send button."
End Sub

This opens a report with the message telling them how to attach the AreaEmail.accdb file. Is there a way to have it already attached when the email opens? I would like for the users to just open the email and hit the Send button.

Thank you.
 
The users may have other email programs beside Outlook. In fact, I don't know what they have and I have no control over it either. Is there something that will allow VBA alone to work regardless of the email prgoram?

Thank you.
 
I don't think you can easily do what you want.

SendObject does work with most email clients, but it doesn't let you specify an arbitrary attachment.

You can DL a CDO library, that will bypass the normal mail client but that requires setting up of the mail parameters for en SMTP-server for each specific organisation, and that could be blocked by the organisation.

Or you could reference each specific mail client that each organisation has - that is not a small task.

Stick with your current solution.
 

Users who are viewing this thread

Back
Top Bottom