Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: fit to page question Post Reply Post New Topic
Author Message
petert
Newbie
Newbie


Joined: 16 Oct 14
Location: United Kingdom
Posts: 6
Quote petert Replybullet Topic: fit to page question
    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.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 20 Oct 14 at 12:08AM
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
IP IP Logged
petert
Newbie
Newbie


Joined: 16 Oct 14
Location: United Kingdom
Posts: 6
Quote petert Replybullet Posted: 21 Oct 14 at 3:39AM
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
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 21 Oct 14 at 7:11AM
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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

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