Jump to content

excel printing fit to page, shrink to page


vkrisz81
 Share

Go to solution Solved by Luke94,

Recommended Posts

hello dears!

i have a program which manipulates excel.. data and formatting.

i have faceing with a hugr problem:

how can i force document when i want to print, must be only 1 page ?

if i use 

$workbook.sheets(1).pagesetup.Orientation = 2       ;landscape

works well, document orientation changes to requested.

but when i use 

$workbook.sheets(1).pagesetup.FitToPagesWide=1
$workbook.sheets(1).pagesetup.FitToPagesTall=1

does not work

Please, how can i modify document to store new setup for printing parameter?

is there another parameter which i should use?

i thought it may be unnecessarry because here i dont want to fit, content is bigger than printarea. i must zoom out to store everything in one page.. 

Thank you for your support!

Link to comment
Share on other sites

  • Solution

Try setting zoom to false:

$workbook.sheets(1).pagesetup.Zoom=False
$workbook.sheets(1).pagesetup.FitToPagesWide=1
$workbook.sheets(1).pagesetup.FitToPagesTall=1
Quote

If the Zoom property is True, the FitToPagesWide property is ignored.

If the Zoom property is True, the FitToPagesTall property is ignored.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...