View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default sendmail message

Ron de Bruin has code that uses CDO to send the mail and avoid the prompt.

Ron de Bruin's site

http://www.rondebruin.nl/sendmail.htm

--
Regards,
Tom Ogilvy

"marta" wrote in message
...
Hello,
Using a macro, I am trying to send a worksheet using the
SendMail action. I get the following message:

"A program is trying to automatically send e-mail on your
behalf. Do you want to allow this?
If this is unexpected, it may be a virus and you should
choose "No"."

This is the code I am using:
ActiveWorkbook.SendMail Recipients:=Array
("recipient1", "recipient2")

Is there any way to avoid this message?

Thank you!
Marta