473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Attach Files to Emails generated in Access VBA

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
3 4739
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: tabonni | last post by:
Hi I try to grab the checked files from HTML page and then send those PDF files as attachments. It can just send email, there are no PDF files attached. Can anybody point out my error? My...
1
by: bmcelhany | last post by:
I have a windows service that monitors a directory for newly created files. When one is found, an e-mail is generated and the new file is added as an attachment. In order to avoid trying to attach...
2
by: Joey | last post by:
I am currently developing a C# asp.net application where users are required to register. The application then generates a simple, plain text email and sends it to the new user. I have been...
8
by: Philippe Lang | last post by:
Hello, I need to send emails from Postgresql triggers. I was able to do it with a 'plperlu' function, that calls the 'system' perl function, that itself calls the 'mail' shell function. Is...
4
by: nonamehkg | last post by:
Hi, I am writing a simple program that sends emails with attachments. I could use "MIMEImage" for .png and then attach it to an "MIMEMultipart" object. But I couldn't or don't know how to...
1
by: kevcar40 | last post by:
i have a form that i want to attach files to as hyperlinks the problem is there could be upto 10 files attached to the form or maybe none How can i go about 1 creating the attachements and...
7
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
2
by: calebmichaud | last post by:
Hi I am having trouble understanding how to attach a file or files to a record. I want to (in form view0 allow the user to attach one or more than one file to the associated record, and then...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.