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
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