J
JayM
Hi
I am trying to create a macro across offices with various printer drivers to
automate printing to certain bins.
Can anyone please tell me if the below code is likely to work or suggest
anything that will. The names of each printer differ on each pc but the
driver names won't
Sub DriverThick()
sDriver = DriverName
If InStr(sDriver, "HP Laserjet 4000 Series PCL6") > 0 Or InStr(sDriver, "HP
Laserjet 4000 Series PCL5e") Then
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterLargeCapacityBin
.OtherPagesTray = wdPrinterLargeCapacityBin
End With
ElseIf InStr(sDriver, "SHARP MX-4500N PCL5c") > 0 Or InStr(sDriver, "SHARP
AR-M450 PCL6") Then
With ActiveDocument.PageSetup
.FirstPageTray = 258
.OtherPagesTray = 258
End With
ElseIf InStr(sDriver, "SHARP AR-M450U PCL6") > 0 Then
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterMiddleBin
.OtherPagesTray = wdPrinterMiddleBin
End With
End If
' Application.PrintOut filename:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False
End Sub
Many thanks
I am trying to create a macro across offices with various printer drivers to
automate printing to certain bins.
Can anyone please tell me if the below code is likely to work or suggest
anything that will. The names of each printer differ on each pc but the
driver names won't
Sub DriverThick()
sDriver = DriverName
If InStr(sDriver, "HP Laserjet 4000 Series PCL6") > 0 Or InStr(sDriver, "HP
Laserjet 4000 Series PCL5e") Then
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterLargeCapacityBin
.OtherPagesTray = wdPrinterLargeCapacityBin
End With
ElseIf InStr(sDriver, "SHARP MX-4500N PCL5c") > 0 Or InStr(sDriver, "SHARP
AR-M450 PCL6") Then
With ActiveDocument.PageSetup
.FirstPageTray = 258
.OtherPagesTray = 258
End With
ElseIf InStr(sDriver, "SHARP AR-M450U PCL6") > 0 Then
With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterMiddleBin
.OtherPagesTray = wdPrinterMiddleBin
End With
End If
' Application.PrintOut filename:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False
End Sub
Many thanks