+ Reply to Thread
Results 1 to 8 of 8

Save worksheet as PDF then email

  1. #1
    Registered User
    Join Date
    07-09-2011
    Location
    Bournemouth, Dorset
    MS-Off Ver
    Excel 2007
    Posts
    4

    Save worksheet as PDF then email

    Hi,

    I have a worksheet which represents an invoice. I wish to save the invoice as a PDF file and then email to a specified address depending on who the invoice is for (the email address should be retrieved from the worksheet).

    I am having trouble with setting the file name and path of the PDF. The type of format I am after is:

    2011-12 Invoice - (then the name of the individual the invoice is being sent to - in this case taken from a cell within the worksheet) - (then the current date).PDF

    When I run the code i currently have (which does not deal with the emailing of the invoice currently and any help on that would be greatly appreciated - I have code for this but dont want to make the thread too long) it returns the error as follows:

    Run-time error '424':
    Object required

    and highlights the file name that I have defined.

    The code i have can be shown below:

    Please Login or Register  to view this content.
    Any assistance with this matter is greatly appreciated. Please accept my apologies if I have not followed the forum rules appropriately this is my first post.

    Thanks very much in advance
    Last edited by royUK; 07-09-2011 at 10:20 AM.

  2. #2
    Registered User
    Join Date
    08-01-2010
    Location
    American in Rovereto, Italy
    MS-Off Ver
    Excel 2010 home & Excel 2010 work
    Posts
    46

    Re: Save worksheet as PDF then email

    Why not use Excels' built in functions to create the PDF ?

    Please Login or Register  to view this content.
    Gordon in Rovereto, Italy

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Save worksheet as PDF then email

    See this by ron de Bruin
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Save worksheet as PDF then email

    as an option...
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Registered User
    Join Date
    07-09-2011
    Location
    Bournemouth, Dorset
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Save worksheet as PDF then email

    I think a combination of all of these replies will do the trick. Thanks very much for the quick response!

    Problem solved

  6. #6
    Registered User
    Join Date
    07-09-2011
    Location
    Bournemouth, Dorset
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Save worksheet as PDF then email

    Dear all,

    Thanks again for the quick responses however i am still having trouble with this code.

    I have adapted what was given in the responses as follows but it returns the following error:

    Run-time error '91'
    Object variable or With block variable not set

    Please Login or Register  to view this content.
    Any help with troubleshooting this error is greatly appreciated.

    Thanks
    Last edited by romperstomper; 07-14-2011 at 10:24 AM. Reason: correct code tags

  7. #7
    Registered User
    Join Date
    07-14-2011
    Location
    Miami, Florida
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Save worksheet as PDF then email

    Pjxcelwizard,

    Sometimes when a simple problem requires a complicated solution its better to approach it from a different direction. Why not install a free pdf printer that can easily convert your worksheet to pdf? Check out this article on choosing the best pdf printer and installing it on your computer: http://www.talesofinterest.net/choosing-the-best-free-pdf-printer-and-installing-it/
    Last edited by romperstomper; 07-14-2011 at 10:24 AM.

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Save worksheet as PDF then email

    Change:
    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

+ 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