Attach file to sendObject

K

Ken Ivins

I want to open an email message and have it attach a ASCII file that I have
stored in a location on my hard drive.

I set up a Send Object

DoCmd.SendObject , , , "(e-mail address removed)", , , "NCBA1 file", "Attached is the
current information for National Benefits Corp.", -1

I do not see how to automatically attach a file such as
C:\aaa\EMIS_FROM_NCBA1.asc

Can this be done with code?

Thanks for your help.

Ken Ivins
 
D

Dirk Goldgar

Ken Ivins said:
I want to open an email message and have it attach a ASCII file that
I have stored in a location on my hard drive.

I set up a Send Object

DoCmd.SendObject , , , "(e-mail address removed)", , , "NCBA1 file", "Attached
is the current information for National Benefits Corp.", -1

I do not see how to automatically attach a file such as
C:\aaa\EMIS_FROM_NCBA1.asc

Can this be done with code?

Thanks for your help.

It can be done with code, but not with SendObject. To send anything but
an Access object as an attachment, you must either automate an e-mail
client such as Outlook, or else use the Messaging API. (Actually, there
may be a third option that is escaping me at the moment.) See Tony
Toews' Access Email FAQ page:

http://www.granite.ab.ca/access/email.htm
 
K

Ken Ivins

Thanks, This will be helpful.

Ken


Dirk Goldgar said:
It can be done with code, but not with SendObject. To send anything but
an Access object as an attachment, you must either automate an e-mail
client such as Outlook, or else use the Messaging API. (Actually, there
may be a third option that is escaping me at the moment.) See Tony
Toews' Access Email FAQ page:

http://www.granite.ab.ca/access/email.htm

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top