+ Reply to Thread
Results 1 to 3 of 3

Save to .pdf with custom page setup

  1. #1
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Save to .pdf with custom page setup

    Hi all, I have been struggling with a save to .pdf macro. I have a Macro in place where I can save my active sheet as a pdf. The sheet is 280 rows long and the .pdf output is spread over multiple pages due to it's length. This is also completely fine.

    The range of the entire sheet is A1:H280. What I'm trying to achieve is to have the range A1:A80 to fit onto the first page of the .pdf, and the range A81:H280 can be spread out over the rest of the pages in the same pdf.

    Im currently using:

    Please Login or Register  to view this content.
    This creates the pdf I need. The struggle is limiting/fitting the custom range A1:A80 on page 1. I have experimented with custom page breaks and PageSetup (Wide/Tall) but have not succeeded yet. The final document will (with all sheets/workdocument locked) be shared with other users.

    Hope someone is able to shine a light on this issue - thank you!
    Last edited by aethsilgne; 08-26-2021 at 10:41 AM.

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

    Re: Save to .pdf with custom page setup

    I don't know of a way to treat some rows different than other rows for page layout formatting. I have two ideas:

    1. Move rows 81-280 to another sheet. Then you can format the first sheet as "One page tall" and print both sheets to PDF at the same time.

    2. Create a new sheet used just for printing purposes that has references back to rows 1-80. Set that sheet up as "One page tall" and then set the Print Selection for the original sheet to A81:H2380. Then print both sheets to PDF at the same time.

    Please Login or Register  to view this content.
    I can be more helpful if could provide your file.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-10-2010
    Location
    Netherlands
    MS-Off Ver
    MS 365 Apps for enterprise - Excel v. 2402
    Posts
    15

    Re: Save to .pdf with custom page setup

    Thank you for your thoughts! I have also already tried your suggestion in 1) by moving rows 81-280 to another sheet. What I struggled with in this case was how to print both sheets to PDF at the same time.

    For the ' original' sheet with rows 1-80 I still need to use
    Please Login or Register  to view this content.
    and I haven't succeeded in expanding the range to the new sheet with the other rows.

    What I should clarify is that the sheet with rows 1-80 is a sheet that users can duplicate. When they than save to PDF this newly duplicated sheet should go on page 1, but the same sheet with rows 81-280 should come after that. That's why I thought I had to keep using ' ActiveSheet' , but with that command I haven't been able to figure out how to print two sheets to PDF at the same time.
    Last edited by aethsilgne; 08-26-2021 at 11:56 AM.

+ 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. [SOLVED] VB code to do page setup and find page breaks
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2019, 06:37 PM
  2. [SOLVED] how to insert modified page setup in print setup
    By JEAN1972 in forum Excel General
    Replies: 1
    Last Post: 01-11-2019, 06:02 AM
  3. [SOLVED] need help with page setup/print Setup on a worksheet
    By laurabach in forum Excel General
    Replies: 9
    Last Post: 04-28-2013, 11:44 PM
  4. Page setup, view page in 3 equal sections?
    By JapanDave in forum Excel General
    Replies: 0
    Last Post: 07-13-2010, 08:03 PM
  5. Set page setup on chart page when no printer is connected
    By Nicky in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-24-2009, 10:13 PM
  6. How do I save "page setup" preferences?
    By samwilkinson in forum Excel General
    Replies: 2
    Last Post: 09-11-2007, 04:06 PM
  7. Replies: 5
    Last Post: 02-22-2006, 08:45 AM

Tags for this Thread

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