Results 1 to 2 of 2
  1. #1
    ragsgold is offline Access & Excel Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2009
    Location
    Denver,CO
    Posts
    51

    Thumbs up Excel attachment and save as draft in outlook

    Hi All



    I have an excel report that i need to save as draft in my outlook. I want to run this from access and i also want the outlook draft to be populated with email address found in my access table.

    Can anyone help

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What do you mean by 'excel report'? How would Outlook save an excel workbook as a 'draft'? Draft what - email with attachment?

    I just tested with Outlook it does allow draft with attachment.

    This code worked for me:
    Code:
    Sub SaveAsDraft()
        Dim objOutlook As Object
        Dim objMailMessage As Outlook.MailItem
        Set objOutlook = CreateObject("Outlook.Application")
        Set objMailMessage = objOutlook.CreateItem(0)
        With objMailMessage
            .To = "address@mymail.com" 
            .Body = "My special message."
            .Subject = "Save as Draft Test"
            .Attachments.Add "path\filename.xlsx"
            .Display
            .Save
            .Close (olPromptForSave)
        End With
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 12-12-2011, 09:57 PM
  2. Replies: 1
    Last Post: 11-12-2011, 02:40 PM
  3. Save as Draft but mandatory field is not required
    By zuerin in forum Programming
    Replies: 5
    Last Post: 06-30-2011, 01:42 AM
  4. Save Report in Attachment
    By A S MANN in forum Queries
    Replies: 1
    Last Post: 10-08-2010, 08:33 PM
  5. How do you file save an 'Attachment' content through code?
    By morespamforya in forum Programming
    Replies: 3
    Last Post: 08-06-2010, 08:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums