Sending e-mail with an attachment

  • Thread starter Thread starter Rob Berkers
  • Start date Start date
R

Rob Berkers

Hello,

I am trying to send an automated e-mail from MS Access. The e-mail
should have an text-file as attachment.

I did take a look at DoCmd.SendObject, but as far as I can see I
cannot use this send the text-file as attachment.

Anyone here able to help me here a bit? We use here Tobit Infocenter
as mail-client (MAPI-complianant).

Thanks in advance,

Rob.
 
Rob said:
Hello,

I am trying to send an automated e-mail from MS Access. The e-mail
should have an text-file as attachment.

I did take a look at DoCmd.SendObject, but as far as I can see I
cannot use this send the text-file as attachment.

Anyone here able to help me here a bit? We use here Tobit Infocenter
as mail-client (MAPI-complianant).

There is nothing built into Access to do this. You need to use VBA code to
automate an external messaging library like Outlook or CDO. CDO is built into
Windows 2000 and newer and has fewer issues than using Outlook. If you Google
for code examples it is pretty easy to set up.
 
Microsoft does not expose a COM object with Office to integrate with
non-Office mail clients. If your mail client has a COM object that can be
written to by VB/VBA, you can use code to send your mail. You can also use
SMTP, or CDO running on a server to send email. I create and send out as
many as 1200 emailed POs as PDF attachments at a time. I had time-out
problems using Outlook/Exchange that caused some to be dropped and the error
just shut down the process. I backed up and used SMTP and an asp page on the
web server and they all go out perfectly.
 
Back
Top