Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook2003-How to send automatically a msg?

Status
Not open for further replies.

treta

Technical User
May 13, 2004
47
Hi
We changed from access97 and outlook97 to ACCESS2003 and OUTLOOK 2003.
Now when I'm trying to send msg the code stops and I have the msg "A program is trying to automatically send e-mail on your behalf"
How can avoid this?
The code I used in access97:

Set appOutlook = New Outlook.Application
Set outMailItem = appOutlook.CreateItem(olMailItem)
outMailItem.To = "Antonio;Teresa"
outMailItem.Subject = "some text"
outMailItem.Send
Set outMailItem = Nothing
Set appOutlook = Nothing

Thanks
Antonio
 
I get the same message as you and I think that this is from Outlook2003 and has to do with some security settings. All I do is to acknowledge the message and the mail goes.

Peace,

me2you
 
Do a google search for outlook object model guard
Redemption seems to be a good tool.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
When the e-mail is displayed then sent you won't get get the message box.

.Display 'This opens the e-mail for viewing
' .Send 'This sends without opening the e-mail (you will get the prompt)


SendKeys "%{s}", True 'This sends the e-mail (won't work if you are stepping through)
 
What I understand is that the problem is not with your code it is service pack 2. What i have read is that if you remove service pack 2 you will not be asked to verify the email. but I wouldn't suggest it.

I would look into Redemption like PHV suggests.

I had this problem but only needed the email two work for about 3 days. I could suffer it for that long.


Some people make things happen, some watch while things happen, and some wonder 'What happened?'
 
Ok Thanks.
This problem is in my work and I have no control over Outlook so I told that to the organization.
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top