Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Maximize Print Size
I need to adjust the zoom settings on Page Setup to fill up the printed
page. (The reverse of condensing the page to fit on one page.) Any ideas on how to do this with VBA? Manually playing with the zoom settings isn't an option. I've created a mini-crossword app and the print range changes based on the size of the puzzle. I don't want the user to have to adjust the settings. Since I've calculated the print range in VBA, I would assume that I could calculate the combined width of the columns and length of the rows. Could this be converted to something that would determine how much of the page would be filled then adjust zoom accordingly? Thanks for the ideas and any sample code. - John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Maximize Print Size
Hello
Here how I would do it in VBA, but maybe there is a better manner Mine is to put the zoom at minimum and count page, if it is still 1, it will continues to add zoom until page count is 2 Sub FitToPage() Application.ScreenUpdating = False For i = 10 To 400 ActiveSheet.PageSetup.Zoom = i numPages = ExecuteExcel4Macro("Get.Document(50)") If numPages 1 Then ActiveSheet.PageSetup.Zoom = i - 1 Exit For End If Next End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Maximize Print Size
Great idea. Much simpler than what I was thinking.
Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I am trying to print on legal size paper, i cant set size. | Excel Discussion (Misc queries) | |||
Save as PDF not same size as Print and Print Preview in Excel | Excel Discussion (Misc queries) | |||
Zoom size doesn't equal print size | Excel Discussion (Misc queries) | |||
Excel-menu feature to maximize print area of sheet | Excel Discussion (Misc queries) | |||
print view & print, in excel, different size cells | Excel Discussion (Misc queries) |