+ Reply to Thread
Results 1 to 3 of 3

Print area to fit page width using vba

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    196

    Print area to fit page width using vba

    I have a macro that saves the print area to a pdf file and automatically names it according to the company naming convention that is required. I did not realize that the saving was not taking up the page. I would like the print area to be one full page wide.

    I'm thinking that if I go to the print menu while recording a macro that I can capture the code to make it do as I need. But, I thought I would check with some experts beforehand. I use this sheet about a hundred times a day give or take.

    Here is my macro:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Print area to fit page width using vba

    Hi Mr_Phil,

    Try the following:
    a. Use a font size that is too large to fit on one page.
    b. Use code like the following code to force the print area to be one page wide:
    Please Login or Register  to view this content.
    I have used the above technique successfully many times. I usually want font size 11, but I set the font size to 18. Excel automatically reduces the Zoom so that the output is one page wide. This has worked for me as long as the resulting Zoom factor is 10% < Zoom Factor < 400%.

    Lewis

  3. #3
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    196

    Re: Print area to fit page width using vba

    Quote Originally Posted by LJMetzger View Post
    Hi Mr_Phil,

    Try the following:
    a. Use a font size that is too large to fit on one page.
    b. Use code like the following code to force the print area to be one page wide:

    Please Login or Register  to view this content.

    I have used the above technique successfully many times. I usually want font size 11, but I set the font size to 18. Excel automatically reduces the Zoom so that the output is one page wide. This has worked for me as long as the resulting Zoom factor is 10% < Zoom Factor < 400%.

    Lewis
    I went the code route since I am self tutoring. I wanted to look for it and try to understand it. It Worked like a charm. Thank you for taking the time to help me.

+ 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. Replies: 2
    Last Post: 02-25-2016, 11:33 AM
  2. VBA Code to Change Length and width of Print Area
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2012, 11:39 AM
  3. Split cells without changing overall width of print area?
    By Kenny Bones in forum Excel General
    Replies: 2
    Last Post: 09-27-2011, 04:34 AM
  4. [SOLVED] How to print fitted 1 page width and 1 page tall
    By SupperDuck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2006, 04:40 PM
  5. Replies: 4
    Last Post: 02-17-2006, 08:36 AM
  6. Replies: 1
    Last Post: 11-24-2005, 07:29 AM
  7. Replies: 4
    Last Post: 10-08-2005, 03:05 PM

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