MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Send e-mail with Excel


Posted by Daniel on August 27, 2001 2:34 PM

Hi Everybody,

In the Tip 16, I found the way to send a sheet by mail :

Sub Macro1()

Application.Dialogs(xlDialogSendMail).Show arg1:="toto@com.fr", arg2:="Essai"

End Sub

Everything is ok, but I don't know the way to finally send the mail with no action of the user. The macro prepares the message correctly, but Outlook Express stays waiting for a click on the "Send" button. Is it possible to add a command that automatically clicks on "Send" ? I tried to add :

Application.SendKeys "%s"

but nothing happens.

Thank you for your help.

Regards,

Daniel


Posted by Rob Jackson on August 28, 2001 4:46 AM

Try Application.SendMail

Posted by Rob Jackson on August 28, 2001 5:17 AM

Ignore Last Reply

Sorry, Last reply was rubbish. What I meant to say was try
workbooks("name").sendmail ("Recipient","Subject")
there are a few more options but basically this is it.

Rob

Posted by Daniel on August 28, 2001 6:35 AM

Re: Ignore Last Reply

Thanks Rob.

The Sendmail works fine.

Everything's ok now.

Regards,

Daniel - Biarritz