+ Reply to Thread
Results 1 to 13 of 13

Printing multiple ranges from multiple pages into one PDF

  1. #1
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Printing multiple ranges from multiple pages into one PDF

    Hello,
    I have been trying to find a solution to my problem without starting a new thread but have had no success. I currently have a project with 3 sheets, I have 1 desired range on each sheet. I have successfully produced the code needed to print all three ranges separately on three different sheets of paper. If I choose to save these ranges in their current configuration it will save 3 different PDF files. I would like to combine the 3 ranges and print one file with 3 pages so I can choose to save those 3 pages into 1 PDF file when I am done. Any help would be greatly appreciated.

    Dustin

  2. #2
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Printing multiple ranges from multiple pages into one PDF

    paste the ranges in a temporary worksheet and export it to PDF. Then delete the tempsheet.

  3. #3
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    Thank you for your response.
    I did hear of this option before, my only holdup would be the fact that each range has its own column/row sizes and if I paste them below each other wont the arrangement be altered?
    I also thought of copying as a picture then pasting into a temp worksheet, is there a way to add a page break below each pasted picture?

    Dustin

  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,721

    Re: Printing multiple ranges from multiple pages into one PDF

    Please show the code you have now. The strategy is going to be to

    Select those ranges on each of those sheets
    Select all three sheets at once
    Export the selection to PDF

    To give specific code I need to see more detail.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: Printing multiple ranges from multiple pages into one PDF

    Something like this:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    Thank you 6StringJazzer for your assistance,
    Here is the code that I have currently. I added a delay between each section since it prints 3 separate documents.

    Dustin

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    I was able to get the code to process however it only prints one of the three ranges. Coincidentally it only prints the page that I am on when I run the macro. Any help would be appreciated.

    Dustin
    Last edited by drautenkranz; 05-23-2018 at 03:48 PM.

  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,721

    Re: Printing multiple ranges from multiple pages into one PDF

    This code worked for me.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    Thank you for the assistance,
    I was able to get the code to work in the sense that it did open one pdf file with all three worksheets merged into it. However, it did not only show the range that I had created. It instead shows every available row and column in the entire worksheet. What am I doing wrong??

    Dustin

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

    Re: Printing multiple ranges from multiple pages into one PDF

    You are probably not doing anything wrong, but my tests are limited since I don't have your file. Let me look to see if there is a flag to include only the selection.

  11. #11
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    I have attached the PDF so you can see how it appears. The first and third pages should only show the cells with data. The last page is close but should zoom to the selection only. Im not sure if it makes a difference but all three of the ranges are dynamic name ranges.

    thank you,
    Dustin
    Attached Files Attached Files

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

    Re: Printing multiple ranges from multiple pages into one PDF

    OK, I got it this time. Note that if the names on the tabs of these three sheets changes, the code has to change. Also note that print areas are set permanently.

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    05-23-2018
    Location
    Naples, FL
    MS-Off Ver
    2013
    Posts
    13

    Re: Printing multiple ranges from multiple pages into one PDF

    Amazing!!!!!!!!

    Your awesome, thank you so much for the assistance.

    Dustin

+ 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. Printing multiple pages using value in cell
    By omer123456 in forum Excel General
    Replies: 0
    Last Post: 06-21-2016, 08:40 PM
  2. Keep first row when printing multiple pages
    By jokris in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-23-2016, 01:41 PM
  3. Printing multiple pages on one Page
    By Befuddled in forum Excel General
    Replies: 17
    Last Post: 02-08-2014, 11:42 PM
  4. Printing Macro for multiple pages
    By jsneak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2014, 05:33 AM
  5. Printing multiple pages per sheet
    By fusse in forum Excel General
    Replies: 2
    Last Post: 01-22-2014, 03:29 PM
  6. Replies: 7
    Last Post: 12-28-2012, 03:10 PM
  7. Printing multiple ranges in multiple worksheet into a single printout
    By frousseau in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2012, 08:53 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