Sending e-Mail From Access

Late4Supper

Registered User.
Local time
Today, 16:57
Joined
Sep 16, 2002
Messages
32
I'm automating an app but I want to send myself an e-Mail after certain steps are completed. I've tried both the SendObject and specific code to open OutLook and send the message. Either way it forces an Outlook screen to open and looks for a reply (A program is trying to automatically send e-mail on your behalf.)

I've tried Interaction.AppActivate and a few other things but nothing seems to work.

I'm running Outlook 2002 and ACCESS 2002 .
 
have u tried this code.

dim objOutlook as new outlook.application
dim objmsg as MailItem
dim strto, msg as string

set objmsg = objOutlook.CreateItem(olMailItem)

strto = "joe@hotmail.com"

msg = "This is a test"

with objmsg
.To = strto
.subject = "Test"
.body = msg
.send
end with
 
Wolfy said:
have u tried this code.

dim objOutlook as new outlook.application
dim objmsg as MailItem
dim strto, msg as string

set objmsg = objOutlook.CreateItem(olMailItem)

strto = "joe@hotmail.com"

msg = "This is a test"

with objmsg
.To = strto
.subject = "Test"
.body = msg
.send
end with
 
Yellow had the answer. It's Outlook's security.

Thanks everyone
 

Users who are viewing this thread

Back
Top Bottom