Emailing Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to find out how I can automatically grab a
specific file from my computer and attach it to an email.
The code I currently have is:

DoCmd.TransferText
acExportDelim, "qryExport_Dazzle", "qryExport_Dazzle", "C:\
DazzleExport.txt"
Name "C:\DazzleExport.txt" As "C:\DazzleExport.csv"

Now I want to add the line to grab that file and email it
to my customer, I don't know that the SendObject works
does it? Or is it only for objects still in the database.
Any help would be nice, thanks

-Steve
 
Steve,

You *could* use SendObject to send your query using the FormatType property
to send it as text; however, the text format is not what I expect you want.
You might want to investigate using Automation with Outlook. There is
sample code at the following links that can get you started:

MSDN article on creating appointments, emails, etc., using Automation
http://tinyurl.com/2knwj

Q161088 Using Automation to Send a Microsoft Outlook Message
http://support.microsoft.com/?id=161088

HOW TO: Use Automation to Send a Microsoft Outlook Message using Access 2000
http://support.microsoft.com/?id=209948

ACC97: How to Use a Recordset to Send Outlook E-Mail to Multiple Recipients
http://support.microsoft.com/?id=318881


Also, have a look at Tony Toews' email page:

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