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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 Paper Trays (difference in Windows 95 and XP?)

Status
Not open for further replies.

tolanc

IS-IT--Management
Apr 29, 2003
10
GB
Hi

I've recently upgraded my PC from Windows 98 to XP Pro. I have a whole bunch of macros/templates that deal with my file creation and these continue to work fine when transferred to XP.

However, the problem is with my printing macros. They worked fine on Windows 98 but since moving, XP appears to just ignore all of the Word paper tray commands (wdPrinterUpperBin, etc) and everything prints from the default tray. I'm still using Word 2000 and the printer is a HP4100TN.

Have things changed on XP? Anyone have any pointers, things to try? Below is the code.


Tolan

=-=-=-=
Private Sub Cmdprint_Click()


Application.PrintOut FileName:="", Range:=wdPrintAllDocument


' This is the default printer trays for the kyocera printers
strLetterhead = wdPrinterUpperBin
strNormalPaper = wdPrinterMiddleBin

' If it's not a kyocera printer you have to tell it to use
' other trays

If InStr(ActivePrinter, "Printer HP 1") <> 0 Then
strLetterhead = wdPrinterUpperBin
strNormalPaper = wdPrinterLargeCapacityBin
End If

If InStr(ActivePrinter, "Printer Kyocera 2") <> 0 Then
strLetterhead = wdPrinterUpperBin
strNormalPaper = wdPrinterLargeCapacityBin
End If


Select Case strPrintChoice
'Letterhead
Case "L"
'Sort Paper
With ActiveDocument.PageSetup
.FirstPageTray = strLetterhead
.OtherPagesTray = strNormalPaper
End With

'Print
Application.PrintOut FileName:="", Range:=wdPrintAllDocument

'Sort Paper
With ActiveDocument.PageSetup
.FirstPageTray = strNormalPaper
.OtherPagesTray = strNormalPaper
End With

'Letter and File Copy
Case "F"
'Sort Paper
With ActiveDocument.PageSetup
.FirstPageTray = strLetterhead
.OtherPagesTray = strNormalPaper
End With

'Print
Application.PrintOut FileName:="", Range:=wdPrintAllDocument

'Sort Paper
With ActiveDocument.PageSetup
.FirstPageTray = strNormalPaper
.OtherPagesTray = strNormalPaper
End With

'Print
Application.PrintOut FileName:="", Range:=wdPrintAllDocument


End Select

Unload Me
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top