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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Set Default folder to Draft 1

Status
Not open for further replies.

T111

Programmer
Jun 28, 2003
91
IE
Hi,

The code below sends the email to the outbox folder in outlook which in turn sends the email automatically. Is there any way of sending the email to the drafts folder which will allow the user to revise the email before its send.

Set out = CreateObject("Outlook.Application")
Set mapi = out.GetNameSpace("MAPI")
Set email = out.CreateItem(0)
EmailAddress = EmailAddress
email.Recipients.Add (EmailAddress)
email.subject = EmailSubject
email.Body = EmailBody
Set myAttachments = email.Attachments
myAttachments.Add FullPathName
email.Send
Set myAttachments = Nothing
Set outlook = Nothing
Set mapi = Nothing

Help ppreciated!
 
I use a .Save to do so:
Code:
   Set appOutlook = CreateObject("Outlook.Application")
      
   Set objMailItem = appOutlook.CreateItem(olMailItem)
   
   With objMailItem
      .Subject = strSubject
      .Body = strBody
      .To = strToAddress
      .CC = strCCAddress
      .Save
      .Display
   End With

   'de-reference objects
   Set objMailItem = Nothing
   Set appOutlook = Nothing


TazUk

Programmer An organism that turns coffee into software. [morning]
Unknown Author
 
Thanks that is just what i needed :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top