Link to home
Start Free TrialLog in
Avatar of scott_nielsen68
scott_nielsen68

asked on

How to print to 2 different printers with 2 diferenent size forms in Access 2003

We have 2 printers attached to a PC running Access 2003.  One printer printers 4 x 6 tags.  The other printer is an HP laserjet for printing reports.  The printer that prints the 4 x 6 tags is set as the default printer.  When we try to set up the reports it thinks that the paper size is the 4 x 6, even if we select the HP as the printer for the report.  How can we set up the reports so that they will print correct on 8 1/2 x 11 paper?

Thanks.
Avatar of Chi Is Current
Chi Is Current
Flag of United States of America image

In design view for the report, set: Page Setup -> Page tab -> Use Specific Printer - choose the printer you intend.  Save and close.

Jacob
You could use macro:
http://wordtips.vitalnews.com/Pages/T001697_Specifying_a_Paper_Tray_in_a_Macro.html
Sub CustomPageSetup()
    Dim strTrayFirst As String
    Dim strTrayOther As String
    Dim lngTrayFirst As Long
    Dim lngTrayOther As Long
 
    'Other setup code goes here
 
    strTrayFirst = System.PrivateProfileString(strIniFile, _
      "Printer Trays", "Letter First")
    If strTrayFirst <> "" Then
        Select Case strTrayFirst
            Case "Automatic Sheet Feed"
                lngTrayFirst = wdPrinterAutomaticSheetFeed
            Case "Default Bin"
                lngTrayFirst = wdPrinterDefaultBin
            Case "Large Capacity Bin"
                lngTrayFirst = wdPrinterLargeCapacityBin
            Case "Large Format Bin"
                lngTrayFirst = wdPrinterLargeFormatBin
            Case "Lower Bin"
                lngTrayFirst = wdPrinterLowerBin
            Case "Manual Feed"
                lngTrayFirst = wdPrinterManualFeed
            Case "Middle Bin"
                lngTrayFirst = wdPrinterMiddleBin
            Case "Upper Bin"
                lngTrayFirst = wdPrinterUpperBin
            Case Else
                lngTrayFirst = wdPrinterLowerBin
        End Select
    End If
 
    strTrayOther = System.PrivateProfileString(strIniFile, _
      "Printer Trays", "Letter Other")
    If strTrayOther <> "" Then
        Select Case strTrayOther
            Case "Automatic Sheet Feed"
                lngTrayOther = wdPrinterAutomaticSheetFeed
            Case "Default Bin"
                lngTrayFirst = wdPrinterDefaultBin
            Case "Large Capacity Bin"
                lngTrayOther = wdPrinterLargeCapacityBin
            Case "Large Format Bin"
                lngTrayOther = wdPrinterLargeFormatBin
            Case "Lower Bin"
                lngTrayOther = wdPrinterLowerBin
            Case "Manual Feed"
                lngTrayOther = wdPrinterManualFeed
            Case "Middle Bin"
                lngTrayOther = wdPrinterMiddleBin
            Case "Upper Bin"
                lngTrayOther = wdPrinterUpperBin
            Case Else
                lngTrayOther = wdPrinterUpperBin
        End Select
    End If
    With ActiveDocument.PageSetup
        .FirstPageTray = lngTrayFirst
        .OtherPagesTray = lngTrayOther
    End With
End Sub

Open in new window

Instead of changing trays You need to change printer but also use the method of changing trays  to set the correct paper size
Avatar of scott_nielsen68
scott_nielsen68

ASKER

Where do I type in the code at?
Sean ~

I think the points should be divided between myself and oleggold for time taken to respond AND our willingness to work on the issue.

Thank you for your work!

Jacob
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial