+ Reply to Thread
Results 1 to 2 of 2

VBA Saving email to Outlook draft folder so you can manually press send at a later time

  1. #1
    Registered User
    Join Date
    03-18-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    2

    VBA Saving email to Outlook draft folder so you can manually press send at a later time

    I am trying to have the VBA code in the Filter sheet email (but actually just save the email to the drafts folder so I can send later)

    It semi works but seems to overwright the previous one I sent (I send about 6 with different data to different email addresses)

    Ideally id like the option to ”send now” or “save to drafts”

    If you can have a look at it id appreciate it


    Private Sub Send_MailEnvelope_Click()
    'Working in Excel 2002-201
    Dim AWorksheet As Worksheet
    Dim Sendrng As Range
    Dim rng As Range

    On Error GoTo StopMacro

    With Application
    .ScreenUpdating = False
    .EnableEvents = False
    End With

    'Fill in the Worksheet/range you want to mail
    'Note: if you use one cell it will send the whole worksheet

    Set Sendrng = Worksheets("Filter").Range("A9")


    'Remember the activesheet
    Set AWorksheet = ActiveSheet

    With Sendrng

    ' Select the worksheet with the range you want to send
    .Parent.Select

    'Remember the ActiveCell on that worksheet
    Set rng = ActiveCell

    'Select the range you want to mail
    Dim sht As Worksheet
    Dim StartCell As Range

    Set sht = Worksheets("Filter")
    Set StartCell = Range("A9")

    'Select Range
    StartCell.CurrentRegion.Select

    ' Create the mail and send it
    ActiveWorkbook.EnvelopeVisible = True
    With .Parent.MailEnvelope

    ' Set the optional introduction field thats adds
    ' some header text to the email body.
    .Introduction = ThisWorkbook.Sheets("Filter").Range("D1").Value

    With .Item
    .To = ThisWorkbook.Sheets("Filter").Range("A1").Value
    .CC = ""
    .BCC = ""
    .Subject = "My Jobs in Tomorrow's Diary"
    .Save
    '.Close 'olPromtForSave
    End With

    End With

    'select the original ActiveCell
    rng.Select
    End With

    'Activate the sheet that was active before you run the macro
    AWorksheet.Select

    StopMacro:
    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    End With
    ActiveWorkbook.EnvelopeVisible = False

    End Sub

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: VBA Saving email to Outlook draft folder so you can manually press send at a later tim

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    i have your solution ready and will post once you comply
    let me know why you have
    Last edited by humdingaling; 04-29-2016 at 12:58 AM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to creat an email draft in outlook using excel macros
    By jeethu570 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2015, 08:30 AM
  2. Send Email when I press "Send" button in Outlook
    By qzqzjcjp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-27-2015, 09:37 AM
  3. [SOLVED] Add File From Folder To Currently Open Email / Draft
    By Citanaf in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2015, 03:37 PM
  4. Macro to send saved draft email from outlook in HTML format
    By jamesshakedown in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2013, 07:55 AM
  5. Saving excel worksheet extract as separate outlook draft
    By naveenrv in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 05:34 PM
  6. Excel Hyperlink send email draft via outlook
    By Sithorce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 10:37 AM
  7. Sending Email Via The Draft Folder
    By The_Snook in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 09-22-2010, 04:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1