[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2002-04-08
4
Medium Priority
?
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 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