+ Reply to Thread
Results 1 to 2 of 2

SaveAs PDF and attach to email macro won't attach?!

  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    SaveAs PDF and attach to email macro won't attach?!

    Hi, I'm trying to get Excel 2010 to save a worksheet as a PDF (using same filepath as workbook), then attach the PDF to a new email. The 'to' email address and 'subject' reference specific cells. Everything works as desired, EXCEPT I can't get the PDF to attach.

    This is a mix of different code I've found online, but I'm not sure why it won't attach.

    I've also been tinkering with Ron de Bruin's page (http://www.rondebruin.nl/mail/outloo...emplatepdf.htm), but I really don't want to have an extra worksheet if possible.

    How can amend the code below to get this rocket to fly? Otherwise, what other code can I use?

    Please Login or Register  to view this content.
    I've ran a search on this subject, but came up pretty empty handed.
    Thanks for the help!

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: SaveAs PDF and attach to email macro won't attach?!

    Firstly, have you got Option Explicit at the top of the code module? If not, add it and fix any compilation errors, and get rid of the On Error lines. It should help you to understand why the file isn't attaching.

    The fix (untested) is probably:
    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

+ 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