Attach file to sendObject

  • Thread starter Thread starter Ken Ivins
  • Start date Start date
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
 
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
 
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)
 
Back
Top