CWatts
Well-known Member
- Joined
- Jan 22, 2010
- Messages
- 701
I currently have a document formatted to print on legal paper. It works great when printing to one of our large workgroup printers which has both letter and legal paper trays and will appropriately use Legal paper to print.
Not everyone wants to print the documents to the big printer and they'd prefer to use their personal printers which are letter only. To acommodate this request I wrote the below macro to change the paper size to legal and fit it to one page.
The proiblem is when myself or someone else tries printing to one of our printers with letter only, the page setup code in the macro seems ineffective.
Iknow the code works becuase when printing to one of the multi-trayed workgroup printers the paper size and zoom adjusts accordingly and sets itself back.
Each time have tested this, I've made sure the default printer was set and I made sure that if Excel were open, I'd close it and reopen it to ensure it would recognize the default printer.
The different printer without legal papers seems to be the only X factor, but I'm at a loss for how to code around that. Anyone have any tips?
Not everyone wants to print the documents to the big printer and they'd prefer to use their personal printers which are letter only. To acommodate this request I wrote the below macro to change the paper size to legal and fit it to one page.
Code:
Sub LetterPrint()
With Sheets("MetricStack").PageSetup
.PaperSize = xlPaperLetter
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Sheets("MetricStack").PrintOut
With Sheets("MetricStack").PageSetup
.PaperSize = xlPaperLegal
.Zoom = 100
End With
End Sub
The proiblem is when myself or someone else tries printing to one of our printers with letter only, the page setup code in the macro seems ineffective.
Iknow the code works becuase when printing to one of the multi-trayed workgroup printers the paper size and zoom adjusts accordingly and sets itself back.
Each time have tested this, I've made sure the default printer was set and I made sure that if Excel were open, I'd close it and reopen it to ensure it would recognize the default printer.
The different printer without legal papers seems to be the only X factor, but I'm at a loss for how to code around that. Anyone have any tips?