In Word97 this Sub worked like a charm:
Sub Page1DifferentBin
Dim lngFirst As Long
Dim lngRest As Long
If Documents.Count > 0 then
ProtOff ‘Set doc protection off
With activeDocument.PageSetup
lngFirst = .FirstPageTray
lngRest = .OtherPagesTray
.FirstPageTray = wdPrinterLowerBin
.OtherPagesTray = wdPrinterDefaultBin
ActiveDocument.PrintOut
.FirstPageTray = lngFirst
.OtherPagesTray = lngRest
ProtOn ‘Set doc protection on
End With
End If
End Sub
This doesn’t work in Word2003. On the lines .FirstPageTray = wdPrinterLowerBin / .OtherPagesTray = wdPrinterDefaultBin, I get Error 4608, Value out of range (translated from Dutch). I’m using the same network printers: HP Color LaserJet 4550 and HP LaserJet 4100, both with an additional 500 page bin.
Substituting these wd-constants with their numbers (2, 0) doesn’t help. In Word97 VBA Help, it states that FirstPageTray and OtherPagesTray are of type Long and Read/Write. But the Word2003 VBA Help doesn’t mention the type at all, just Read/Write.
Can anyone shed any light on this?