palaeontology
Active Member
- Joined
- May 12, 2017
- Messages
- 444
- Office Version
- 2016
- Platform
- Windows
I'm currently using the following code (inside a much larger code) to print all worksheets that are named with a 5-digit code ....
The code also forces the prints to be in Landscape.
What would I need to add if I want to force the prints to be ...
* one-sided
* Narrow Margins (Left 0.64cm Right 0.64cm Top 1.91cm Bottom 1.91cm )
* Fit sheet on one Page
I have these print-settings as default on my own computer, but this spreadsheet will be used by about 70 other users who are likely to have different settings to those I know are required.
Kind regards,
Chris
Code:
For Each ws In ThisWorkbook.Worksheets If ws.Name Like "#####" Then
ws.Range("P22:U22").Font.Color = vbWhite
ws.Range("P22:U22").Interior.Color = vbWhite
ws.PageSetup.Orientation = xlLandscape
ws.PrintOut From:=1, To:=1
End If
Next ws
The code also forces the prints to be in Landscape.
What would I need to add if I want to force the prints to be ...
* one-sided
* Narrow Margins (Left 0.64cm Right 0.64cm Top 1.91cm Bottom 1.91cm )
* Fit sheet on one Page
I have these print-settings as default on my own computer, but this spreadsheet will be used by about 70 other users who are likely to have different settings to those I know are required.
Kind regards,
Chris