View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Cannot send out Excel workbook through Outlook Express

See
http://www.rondebruin.nl/mail/problems.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Abel Chan" wrote in message ...
Hi Ron,

Thanks to your quick reply. I used your code and got error 1004
Application-defined or object-defined error. Somehow Excel was unable to
find Outlook Express.

On the other hand, I was able to use your code at:
http://www.rondebruin.nl/mail/oebody.htm to bring up a dialog box and send
out a test email.

I also tried the Outlook object code and got similar error:
Application.Dialogs(xlDialogSendMail).Show aryEmailAddress, strEmailSubject

Thanks so much Ron.

Abel

"Ron de Bruin" wrote:

Hi Abel

Your code is not the same as the Example on my site

Sub Mail_workbook_1()
ActiveWorkbook.SendMail ", _
"This is the Subject line"
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Abel Chan" wrote in message ...
Hi all,

I was trying to send out an excel workbook through Outlook Express.

I looked at http://www.rondebruin.nl/ and have:
Workbooks.Application.ActiveWorkbook.SendMail ", _
"This is a test"
In my code but I got an error 1004 "Method 'SendMail' of object '_Workbook'
failed"

I checked my Internet Option | Program and it has Outlook Express as the
default Email.

Any idea why?

Thanks so much.

Abel Chan