Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use VBA to set print to fit page size - Help Please.

Status
Not open for further replies.

newbee2

Technical User
Apr 21, 2002
85
Hi
I have an existing form in a workbook which I can open in
access using code and get it to print (It is a
checklist). The form is such that it occupies 1 and a bit
A4 size sheets when it prints. How can I set the print
area to make the form fit to one A4 size sheet and
continue to print out, in code. I don't wont to reinvent
the form as it has been used for a long time.
Manually you can set the print area and set the fit to
page. How can this be done in code.
Thank you in advance.
William
 
Hello William!

Try using this before you print:
ActiveSheet.PageSetup.FitToPagesWide = 1
ActiveSheet.PageSetup.FitToPagesTall = 1

Hope this helps,
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top