?
Solved

How to put E-mail message and attachments into Drafts folder?

Posted on 2002-04-08
4
Medium Priority
?
155 Views
Last Modified: 2010-05-02
I have the code:
    Dim a As Outlook.Application
    Dim b As Outlook.MailItem
    Set a = New Outlook.Application
    Set b = a.CreateItem(olMailItem)
    With b
        .To = mstrEMail
        .Subject = "Commission Report"
        ' .BCC = "someemail2@whatever.com" '
        .Attachments.Add oFolder.Path & "\" & oFile.Name
        .Body = "Attached is your Commission Report."
        '.Send
    End With
I don't want to send. I want to put everything into the Drafts folder first. How can I do it?
0
Comment
Question by:timofeia
  • 2
4 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6925594
you can try
.save

Saves the Outlook item to the current folder or, if this is a new item, to the Outlook default folder for the item type.

Syntax

object.Save

object   Required. An expression that returns an Outlook item object that is listed in the "Applies To" list.
0
 
LVL 5

Accepted Solution

by:
rkot2000 earned 400 total points
ID: 6925601
i just tried save and it's working fine.

Dim a As Outlook.Application
   Dim b As Outlook.MailItem
   Set a = New Outlook.Application
   Set b = a.CreateItem(olMailItem)
   With b
       .To = "me"
       .Subject = "Commission Report"
       ' .BCC = "someemail2@whatever.com" '
       '.Attachments.Add oFolder.Path & "\" & oFile.Name
       .Body = "Attached is your Commission Report."
       .Save
   End With
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6925615
maybe you need to create message in drafts forlder:
see this as a guide:

Dim myOlApp As New Outlook.Application
Dim myExplorers As Outlook.Explorers
Dim myOlExpl As Outlook.Explorer
Dim myFolder As Outlook.MAPIFolder
Set myExplorers = myOlApp.Explorers
Set myFolder = myOlApp.GetNamespace("MAPI").GetDefaultFolder _
    (olFolderDrafts)
Set myOlExpl = myExplorers.Add _
    (myFolder, olFolderDisplayNoNavigation)
myOlExpl.Display
0
 

Author Comment

by:timofeia
ID: 6925678
Thanx, it works perfectly
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question