+ Reply to Thread
Results 1 to 8 of 8

Print 2 Excel sheets to same PDF File

  1. #1
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Print 2 Excel sheets to same PDF File

    Hi,
    I need to print 2 excel sheets into the same PDF File (I use Primo PDF if that matters).
    Currently the way it works is that it selects sheet then prints it, then call another macro and then selects that sheet and prints it.
    But when it does that it is basically creating 2 separate PDF Files which I don't want.
    Also I don't need to have the print dialog box come up twice.
    Any Ideas?

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Print 2 Excel sheets to same PDF File

    Try this, but I didn't create a file to test it. It would be easier to have yours.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Print 2 Excel sheets to same PDF File

    Hi 6StringJazzer,
    Thanks! I seem to be getting an error in
    Please Login or Register  to view this content.
    line when I try it.
    My file is to large to upload

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Print 2 Excel sheets to same PDF File

    OK, this one was tested in a mock-up.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Print 2 Excel sheets to same PDF File

    Thanks, Sorry about late reply, but works good!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Print 2 Excel sheets to same PDF File

    This could also be exported directly to PDF natively in 2007+ without having to bring up the print dialog for the user and going through a third-party PDF writer. Do you need to go through the print dialog, or would you prefer to go direct to PDF?

  7. #7
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Print 2 Excel sheets to same PDF File

    Sure, what would that look like, may be easier...

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Print 2 Excel sheets to same PDF File

    Modify the code as shown. You will have to specify the location where you want it to be saved as shown. If you want to allow the user to specify anything they want then maybe the original version is your best bet.

    Please Login or Register  to view this content.

+ 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. Print 2 sheets to one PDF file
    By akderitend in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2014, 08:31 AM
  2. Replies: 6
    Last Post: 05-03-2013, 09:52 AM
  3. [SOLVED] Schedule Excel to open file, print sheets, close file
    By tonychopra194 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2012, 05:15 AM
  4. Print sheets to PDF when file opened?
    By Wabby in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2010, 05:21 AM
  5. Replies: 2
    Last Post: 04-07-2005, 09:06 AM

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