By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,309 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,309 IT Pros & Developers. It's quick & easy.

Attach Files to Emails generated in Access VBA

P: n/a
In Access, using VBA, I am sending emails based on query results. These
email include relevant information to a scheduled event the recipient is
assigned to. This is working great. What I have been ask to do now is
to include an attached file, that when opened will be an Outlook
Calendar event and when saved the event will be added to the recipient's
calendar in Outlook. These files are .vcs files. I am able to create
the necessary file, but what I am not able to do is attach the file to
the email message generated from Access. I am using the
"DoCmd.SendObject" command in Access to generate and send the email
messages.
I would appreciate any help in learning how to attached files to emails
generated in Access. Please reply to the thread. Thanks in advance for
your help.

Brian

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Wizard wrote:
In Access, using VBA, I am sending emails based on query results.
These email include relevant information to a scheduled event the
recipient is assigned to. This is working great. What I have been
ask to do now is to include an attached file, that when opened will
be an Outlook Calendar event and when saved the event will be added
to the recipient's calendar in Outlook. These files are .vcs files.
I am able to create the necessary file, but what I am not able to do
is attach the file to the email message generated from Access. I am
using the "DoCmd.SendObject" command in Access to generate and send
the email messages.
I would appreciate any help in learning how to attached files to
emails generated in Access. Please reply to the thread. Thanks in
advance for your help.

Brian

*** Sent via Developersdex http://www.developersdex.com ***


SendObject can only send attachments by creating them on-the-fly form an
Access Object (form, report, query), hence the name.

You will have to automate an external messaging library like Outlook, CDO,
MAPI, etc, to create a message with an external file as an attachment.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
Thanks for your prompt reply. I suspected this would be the case, but
needed to ask just in case it could be done.
Thanks.
Brian

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

P: n/a
You can add a reference to microsoft outlook object library.
This can definitely be done.

Here's a good place to start:
http://msdn.microsoft.com/library/de..._ac_olauto.asp

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.