![]() |
![]() ![]() ![]() ![]() |
![]() ![]() |
Programming | |
![]() |
Topic: fit to page question | ![]() ![]() |
Author | Message |
petert
Newbie ![]() Joined: 16 Oct 14 Location: United Kingdom Posts: 6 |
![]() ![]() ![]() Posted: 17 Oct 14 at 7:57AM |
Hello
Could you tell me how to set the fit to page option in VBA please? Thank you. |
|
![]() |
|
Michel_K17
Moderator Group ![]() ![]() Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
![]() ![]() ![]() |
Hi,
The "fit-to-page" is set from the originating application such as "Word" or "Excel". I don't remember by heart how to change that setting in Word, but here is an example for Excel: With ActiveSheet.PageSetup .FitToPagesWide = 1 .FitToPagesTall = 1 End With Is that what you were looking for? |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
![]() |
|
petert
Newbie ![]() Joined: 16 Oct 14 Location: United Kingdom Posts: 6 |
![]() ![]() ![]() |
Hello
Thanks for the help. I have tried using the code you suggested but the right hand side of the pdf is still chopped off. Am I doing something wrong? Thanks With Application.ActiveWorkbook.Sheets(1).PageSetup .FitToPagesWide = 1 .FitToPagesTall = 1 End With Application.ActiveWorkbook.Sheets(1).PrintOut 1, 1, 1, 0, MyBatchPrinter |
|
![]() |
|
Michel_K17
Moderator Group ![]() ![]() Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
![]() ![]() ![]() |
Looks good.
You can check the printer properties of the Batch Printer in the Windows Control Panel to make sure that the zoom setting is set to 100%. Also, not know what your spreadsheet looks like, you might want to check the wordwrap settings of the cells. If you go into Excel, and manually print to a printer, and do the page preview, does it show that that the printout is chopped off? That's all I can think of at this time. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
![]() |
|
![]() ![]() |
||
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |