cdo

S

seeker

the following code is ran on a timer within a form. i have placed fake
emails to protect the innocent. the file hourlyupdate.xls is created but an
email is never generated. I am using this instead of sendobject to get
around the outlook permission box.

Dim objmessage As New CDO.Message

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryThoseWhoAreHere", "c:\hourlyupdate.xls"
Set objmessage = CreateObject("CDO.Message")
objmessage.Subject = "Hourly Update"
objmessage.From = "(e-mail address removed)"
objmessage.To = "(e-mail address removed)"
objmessage.TextBody = "This is your hourly update."
objmessage.AddAttachment "c:\hourlyupdate.xls"
objmessage.Send
 

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