Print / Zoom - can .Zoom be used with .FitToPagesTall = 1 ?

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,786
Office Version
  1. 2016
Platform
  1. Windows
I want to make sure data stays on one page. Some times the FitToPageTall and Wide makes the page about 50% when 70% will get everything on page. I am not where I can check this on printer--can you use .zoom = 70 with the FittoPage lines?<pre>Sub PrintActiveSheet()
With ActiveSheet.PageSetup
.FitToPagesTall = 1
.FitToPagesWide = 1
.zoom = 70
.LeftFooter = ActiveSheet.Name
.RightFooter = Format(Now, "ddd d mmm yyyy")
End With
ActiveSheet.PrintOut
ActiveSheet.DisplayPageBreaks = False
End Sub</pre>
This message was edited by ya on 2002-10-18 10:55
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hello,

You can set Zoom=False and then use the FitTo properties i.e.

<pre>
Sub PrintActiveSheet()
With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
.LeftFooter = ActiveSheet.Name
.RightFooter = Format(Now, "ddd d mmm yyyy")
End With
ActiveSheet.PrintOut
ActiveSheet.DisplayPageBreaks = False
End Sub
<pre>
 
Upvote 0
dk - I originally had the ".Zoom = False" in the code, but on some sheets it would print at 50 percent.

So I came up with some code to set all the columns and then set zoom to 70 percent and then print. The code just seem cumbersome.<pre>Sub PrintDTTMPageSetup()
Rows("16:100").RowHeight = 14
Columns("A:A").ColumnWidth = 19
Columns("B:B").ColumnWidth = 5
Columns("C:C").ColumnWidth = 6.5
Columns("D:D").ColumnWidth = 7.5
Columns("E:E").ColumnWidth = 10.5
Columns("F:F").ColumnWidth = 7.2
Columns("G:J").ColumnWidth = 8
Columns("K:K").ColumnWidth = 10
Columns("L:L").ColumnWidth = 8.2
Columns("M:M").ColumnWidth = 9.5
Columns("N:N").ColumnWidth = 8
Columns("O:O").ColumnWidth = 9
Columns("P:P").ColumnWidth = 8.5
Columns("Q:Q").ColumnWidth = 8.5
Columns("R:R").ColumnWidth = 8.5
Columns("S:S").ColumnWidth = 8.5
Columns("T:T").ColumnWidth = 8.5
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.Zoom = 70
End With
End Sub</pre>
This message was edited by em on 2002-09-23 01:53
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top