Consulting

Results 1 to 3 of 3

Thread: Solved: Save email in drafts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location

    Solved: Save email in drafts

    Is there a way to tweek the below code to have the email go into your drafts in outlook instead of automatically sending it?

    [VBA]Sub EmailFidelity()
    Dim oOutlook As Object
    Dim oMailItem As Object
    Dim oRecipient As Object
    Dim oNameSpace As Object
    Dim Lastrow As Long
    Dim bodyText As String
    Dim i As Long


    Set oOutlook = CreateObject("Outlook.Application")
    Set oNameSpace = oOutlook.GetNameSpace("MAPI")
    oNameSpace.Logon , , True


    Set oMailItem = oOutlook.CreateItem(0)

    With oMailItem

    Set oRecipient = .Recipients.Add("klartigue@avalonadvisors.com")
    oRecipient.Type = 1

    .Subject = "Avalon Trade Allocations Attached"

    .body = "Please see the attached trade allocations." & vbNewLine & vbNewLine & _
    "Let me know if you need anything else." & vbNewLine & vbNewLine & _
    "Thanks, " & vbNewLine & vbNewLine & _
    "Katherine Lartigue " & vbNewLine & _
    "klartigue@avalonadvisors.com 713-238-2088"

    .Attachments.Add ("G:\Katherine Lartigue\Allocations\Fidelity Trades.xls")
    . Send
    End With

    End Sub[/VBA]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,443
    Location
    Change .Send to .Save
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor
    Joined
    Aug 2011
    Posts
    353
    Location
    Works great, thanks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •