+ Reply to Thread
Results 1 to 7 of 7

Saving a sheet as a landscape fit-to-width PDF

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    26

    Saving a sheet as a landscape fit-to-width PDF

    I have a sheet with data that is generated with some other VBA code. It uses columns A-J, and number of rows is varying. I need to save the sheet as a PDF, landscape and fit to width. Any ideas how to do that?

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,206

    Re: Saving a sheet as a landscape fit-to-width PDF

    Before saving as a PDF file, go to Page Setup and set the orientation to landscape.

    Artik

  3. #3
    Registered User
    Join Date
    07-20-2019
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    26

    Re: Saving a sheet as a landscape fit-to-width PDF

    Quote Originally Posted by Artik View Post
    Before saving as a PDF file, go to Page Setup and set the orientation to landscape.

    Artik
    Thanks for the reply!
    I was thinking about the code to this automatically. Not sure what the next step would be.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Saving a sheet as a landscape fit-to-width PDF

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Saving a sheet as a landscape fit-to-width PDF

    I forgot about your "fit to width" request. Change references as required.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-20-2019
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    26

    Re: Saving a sheet as a landscape fit-to-width PDF

    I use the following code:

    Please Login or Register  to view this content.
    Thanks for the replies!

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Saving a sheet as a landscape fit-to-width PDF

    If that is what you need and it works for you, good to know and thanks for letting us know.
    You should get used to setting a PrintRange though.
    Good luck.

+ 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] Print sheet in landscape
    By antcha in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2015, 02:52 AM
  2. Pivot table autofit column width and formatting to print in landscape
    By pdalal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2014, 03:46 PM
  3. Replies: 1
    Last Post: 09-11-2013, 02:47 PM
  4. Saving xls file as fixed width
    By MissMac in forum Excel General
    Replies: 3
    Last Post: 02-23-2010, 06:00 AM
  5. Sheet in landscape format
    By kensprint in forum Excel General
    Replies: 5
    Last Post: 04-01-2009, 09:53 AM
  6. Print Macro (Code to change the sheet to Landscape)
    By pinkgold in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2009, 08:17 AM
  7. Saving Column Width and Cell Merges
    By blizzard0c in forum Excel General
    Replies: 4
    Last Post: 07-08-2008, 07:59 PM

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