Solved

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

Posted on 2002-04-08
4
140 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 100 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now