Printing to Multiple Trays Problem

J

JamesW

I have the following macro that used to work for our
Laserjet 5si however we have changed the printer for a
Laserjet 4200 and the macro prints the whole document to
tray 1 rather than first page to tray 1 and other pages to
tray 3. Printing to the LJ5N works fine. Any help would
be appreciated.

Sub Fourcopy()
'
' Fourcopy Macro
' Macro recorded 13/05/97 by Gateway 2000 licensed User
'
ActivePrinter = "\\admin2000\envhlth_4200tn1"
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.Gutter = InchesToPoints(0)
Rem .HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.27)
.PageHeight = InchesToPoints(11.69)
.FirstPageTray = wdPrinterUpperBin
.OtherPagesTray = wdPrinterLowerBin
.SectionStart = wdSectionNewPage
Rem .OddAndEvenPagesHeaderFooter = False
Rem .DifferentFirstPageHeaderFooter = True
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
End With
Application.PrintOut FileName:="",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=False,
PrintToFile:=False
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or
ActiveWindow. _
ActivePane.View.Type = wdOutlineView Or
ActiveWindow.ActivePane.View.Type _
= wdMasterView Then
ActiveWindow.ActivePane.View.Type = wdPageView
End If
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
End If
Selection.ParagraphFormat.Alignment =
wdAlignParagraphRight
Selection.Font.Size = 8
Selection.TypeParagraph
Selection.Fields.Add Range:=Selection.Range,
Type:=wdFieldEmpty, Text:= _
"FILENAME \p ", PreserveFormatting:=True
ActiveWindow.ActivePane.View.SeekView =
wdSeekMainDocument
ActivePrinter = "\\admin2000\envhlth_LJ5N"
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.Gutter = InchesToPoints(0)
Rem .HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.27)
.PageHeight = InchesToPoints(11.69)
.FirstPageTray = wdPrinterLowerBin
.OtherPagesTray = wdPrinterLowerBin
.SectionStart = wdSectionNewPage
Rem .OddAndEvenPagesHeaderFooter = False
Rem .DifferentFirstPageHeaderFooter = True
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
End With
Application.PrintOut FileName:="",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=False,
PrintToFile:=False
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.Gutter = InchesToPoints(0)
Rem .HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.27)
.PageHeight = InchesToPoints(11.69)
.FirstPageTray = wdPrinterUpperBin
.OtherPagesTray = wdPrinterUpperBin
.SectionStart = wdSectionNewPage
Rem .OddAndEvenPagesHeaderFooter = False
Rem .DifferentFirstPageHeaderFooter = True
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
End With
Application.PrintOut FileName:="",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=False,
PrintToFile:=False
ActivePrinter = "\\admin2000\envhlth_LJ5"
End Sub
 
R

RWN

Far from being an expert, but;
Is the driver installed on the local machine?
My experience was the same, albeit not printing from a macro, but I
couldn't select trays until the driver was installed locally.
 
J

JamesW

Thanks for the suggestion. I have tried installing the
driver locally and am still getting the same problem.
Only seems to want to print to tray 1.

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top