Auto Pagination for all types of printers

dctorrez

New Member
Joined
Sep 13, 2005
Messages
11
I have a document that I'm sharing use with my company and there several types of printers in the company. When I created the document everything printed fine on my printer. Now when another office wants to print and they have a different printer the pagination is off. Is there a command line I can insert that will auto adjust for different printer types ?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Code:
Is there a command line I can insert
No.

The difference is caused by the printer drivers on the various machines.

This might solve the problem. It forces the pages to reset when the workbook is opened. NB. There are 2 separate versions versions of the code here (or could be used together as shown). It goes into the ThisWorkBook code module.

Code:
Private Sub Workbook_Open()
    ' version for all sheets
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
        ws.PageSetup.FitToPagesWide = 1
        ws.PageSetup.FitToPagesTall = 4
    Next
    '------------------------------------------------
    ' alternative for individual sheet
    With Worksheets(1)
        .PageSetup.FitToPagesWide = 1
        .PageSetup.FitToPagesTall = 2
    End With
End Sub
 
Upvote 0
Printing a document on different printers

We tried the code but it appears to be still having problems. The problem is one office might have a HP 1200 and another might have a HP1400 and a third might have an Epson.

Do you think that code you provided might have solved my problem knowing this ?
 
Upvote 0
We tried the code you provided but, it appears that it still is not setting the page brake up correctly. My issue is one office might have a HP1200 and the other a HP1400 then one might have a Epson 740. Do you think now knowing this the code should have corrected the problem?
 
Upvote 0
As stated, the idea was to force the printer driver on the existing machine to work so it would change the settings according to the local requirement. I have never tried this because we all use HP printers here.

I assume you changed the numbers to suit your printout.

It may not have worked because you already have the settings. Try this code which changes to a single sheet and then back again (in theory :biggrin: )
Code:
    For Each ws In ThisWorkbook.Worksheets
        '- change to single page
        ws.PageSetup.FitToPagesWide = 1
        ws.PageSetup.FitToPagesTall = 1
        '- change to required setting
        ws.PageSetup.FitToPagesWide = 1
        ws.PageSetup.FitToPagesTall = 4
    Next

The only other thing I can think of is to put hard page breaks.
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,048
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top