Excel vb Email

J

Jonathan

Hello.

I am looking for some help with a function to send a workbook by email
without knowing whether the user has outlook or outlook express. I can make
the funtion work with either email program but not both. I am using Office
2000.

Thanks

Jonathan
 
J

Jonathan

Thanks for the quick response....

I am using this exact code

ActiveWorkbook.SendMail "[email protected]", "This is the Subject line"

and have tried

Application.Dialogs(xlDialogSendMail).Show ("[email protected]"), ("hi")


Both of these work in Outlook without problem but refuse to work in outlook
express (Outlook express version is 6.00) I have tried with outlook express
open and closed and outlook is the default mail program. Any hints would be
great.

Thanks

Jonathan
 
R

Ron de Bruin

Hi Jonathan
and outlook is the default mail program

Is this a typo?

If not change it to Outlook Express
Start>Settings>Control Panel....Internet options (Program Tab)
Close Excel first before you make a change.
 
J

Jonathan

I get the error "Runtime 1004 Show method of dialog class failed" when using
the below code

Application.Dialogs(xlDialogSendMail).Show ("[email protected]"), ("hi")

and the error "Method 'SendMail' of object '_Workbook' failed"

with the code

ActiveWorkbook.SendMail "[email protected]", "This is the Subject line"

Jonathan
 
Top