sending automatic email with VBA-Excel in Vista OS and Windows Mail

A

Alain Bernard

Hi,

The following code run perfectly with Windows2000 and Outlook. Using Vista
OSa nd Windows Mail that doesn't work any more. Is there a specific library
to select ? or Is there a different code ?

Set myMailApp = CreateObject("Outlook.Application")
Set myMail = myMailApp.CreateItem(olMailItem)
With myMail
.To = "(e-mail address removed)"
.Subject = "test"
.Body = "test"
'.Attachments.Add Path & "\" & File
.ReadReceiptRequested = True
.Display
End With

Could any body send me back information to adapt this code in my environment
?

Thank you in advance.
Alain
 
A

Alain Bernard

Thank you to Ron de Bruin for his help.
I need more precisions.

In CDO context the .Display method does'nt exists and I have not found the methods to attach a file to my mail and to view it before sending it.
I have already include the "Microsoft CDO for Windows 2000 library" but there is'nt any description of all methods and properties of these functions.

How to get these descriptions ? Reading some tips about CDO methods I tested the option .Send showDialog:=True without success.

Thank you in advance for your help.
 
R

Ron de Bruin

As far as I know it is not possible to view the mail before you send it with CDO

Use the SendMail code and not fill in the To
Like this

.SendMail "", "This is the Subject line"



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Thank you to Ron de Bruin for his help.
I need more precisions.

In CDO context the .Display method does'nt exists and I have not found the methods to attach a file to my mail and to view it before sending it.
I have already include the "Microsoft CDO for Windows 2000 library" but there is'nt any description of all methods and properties of these functions.

How to get these descriptions ? Reading some tips about CDO methods I tested the option .Send showDialog:=True without success.

Thank you in advance for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top