+ Reply to Thread
Results 1 to 5 of 5

Macro to attach workbook to Outlook email but NOT send

  1. #1
    Registered User
    Join Date
    11-10-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to attach workbook to Outlook email but NOT send

    Hi,

    I have a workbook in which there is a macro that needs to, when clicked, open an Outlook email and attach the workbook to it. I have found a macro to do this, but it also sends the email.

    I need one that doesn't send the email because the user needs to attach an image and a logo (it's a booking form for an online auction website) before the email is sent.

    Does anyone know code for a macro that attaches the workbook to the email, but does not send the email, instead letting the user edit the email before choosing to send it themselves?

    Hope that is clear, if not please let me know if more info is needed.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Re: Macro to attach workbook to Outlook email but NOT send

    hi,

    find this line on your code
    .send
    change this to
    .display

    hope it works...

    Arvind

  3. #3
    Registered User
    Join Date
    11-10-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro to attach workbook to Outlook email but NOT send

    Hi Arvind,

    I tried replacing 'send' with 'display', but it gave me an error. The code is:

    Application.Dialogs(xlDialogSendMail).Show
    ActiveSheet.Shapes("Button 7").Select
    Selection.Characters.Text = "Button 7"
    With Selection.Characters(Start:=1, Length:=8).Font
    .Name = "Tahoma"
    .FontStyle = "Regular"
    .Size = 10
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ColorIndex = xlAutomatic
    End With
    Range("I31").Select

    So in the top line, I changed it to 'xlDialogDisplayMail'... didn't work. Do you know any other way?

    Thanks for your help

  4. #4
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Re: Macro to attach workbook to Outlook email but NOT send

    Hi,

    can u please post the entire code or attach a sample workbook?

    Arvind

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to attach workbook to Outlook email but NOT send

    kbwilson, welcome to the board, however, note:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here


    Please edit your prior post in accordance with the above.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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