Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Outlook mail

Status
Not open for further replies.

yeti

Programmer
Mar 22, 2001
33
GB
Hello all

I need to find a way of automating the creation of an Outlook mail message (not Express) - but not send it. Instead, the mail message just needs to be displayed on-screen ready for the user. I need to be able to set the destination, subject and (most importantly) the body of the message (HTML).

Ideally the script would force Outlook to launch (if not already running) and then display the new mail message, completed and ready for further modification by the user before sending.

I've tried using Mailto but this does not allow me to choose the fonts in the body of the new message. I've also tried using CDO but am not getting the results I need.

Can anyone help?

Andrew
 
And what have you so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
After you have created the mail object, use the display method rather than the send method.
Code:
dim olApp,olMail
 Set olApp = CreateObject("Outlook.Application")
 Set olMail = olApp.CreateItem(MailItem)
 olMail.Display
 'cleanup
 set olApp = nothing
 set olMail = nothing
this might work


Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top