VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Excel Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 04-16-2012, 02:20 PM   #1
Klartigue

 
Joined: Aug 2011
Posts: 308
Kb Entries: 0
Articles: 0
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 tags courtesy of www.thecodenet.com

Local Time: 01:54 PM
Local Date: 05-21-2013
Location:

 
Reply With Quote Top
Old 04-16-2012, 03:17 PM   #2
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 23,118
Kb Entries: 3
Articles: 2
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

Local Time: 10:54 PM
Local Date: 05-21-2013
Location:

 
Reply With Quote Top
Old 04-16-2012, 03:19 PM   #3
Klartigue

 
Joined: Aug 2011
Posts: 308
Kb Entries: 0
Articles: 0
Works great, thanks!!

Local Time: 01:54 PM
Local Date: 05-21-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 02:54 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express