+ Reply to Thread
Results 1 to 8 of 8

Save worksheet as a PDF and email as attachment

  1. #1
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Save worksheet as a PDF and email as attachment

    I have a code that temporarily saves a worksheet then attaches it to an email but I need it to be in pdf format.

    Would anyone know how to do this?

    It will not allow me to post the code as HTML is blocked

    Thanks

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,285

    Re: Save worksheet as a PDF and email as attachment

    Saves active sheet as PDF and emails

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Re: Save worksheet as a PDF and email as attachment

    nigelog,

    Thanks for the quick reply.

    It gives me a run time error 1004 and highlights the line .ExportAsFixedFormat Type:=xlTypePDF, Filename:=PdfFile, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

    Is there something else I need to do?

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,285

    Re: Save worksheet as a PDF and email as attachment

    my guess is you have no folder called Temp on C: drive - change this to suit

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Re: Save worksheet as a PDF and email as attachment

    That's what it was thanks nigelog..

    Can I change the name of the pdf on the attachment and can I get my email signature on the email?

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,285

    Re: Save worksheet as a PDF and email as attachment

    Hi
    change the filename here by changing title and PdfFile lines
    Please Login or Register  to view this content.
    and look at this from Ron de Bruin for attaching a signature
    https://www.rondebruin.nl/win/s1/outlook/signature.htm

    Edit: Forgot to add the link
    Last edited by nigelog; 10-02-2019 at 06:29 AM.

  7. #7
    Registered User
    Join Date
    06-27-2019
    Location
    UK
    MS-Off Ver
    2010
    Posts
    98

    Re: Save worksheet as a PDF and email as attachment

    Thanks nigelog

  8. #8
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,285

    Re: Save worksheet as a PDF and email as attachment

    Glad to help and thanks for the feedback and rep

+ 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. To save email attachment from Outlook
    By Espilano in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2019, 05:28 AM
  2. Save email attachment in a specific folder.
    By Jim15 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 06-14-2019, 09:52 AM
  3. [SOLVED] Rule to file email in email folder, save the attachment to desk top and update spreadsheet
    By JET2011 in forum Outlook Formatting & Functions
    Replies: 49
    Last Post: 08-29-2018, 12:49 PM
  4. VBA - To save attachment from email to folder
    By narindran in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2016, 11:35 PM
  5. [SOLVED] How to get outlook email attachment using excel vba and save it in a specified folder
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2016, 08:34 PM
  6. Trying to save email by attachment name using VBA code
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2012, 04:29 PM
  7. email excel file or worksheet as an attachment to multiple email addresses
    By jgeagle5 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-16-2009, 03:40 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