The macro below is designed to print a document, first page headed, subsequent pages on quality plain and also print the whole document again on copy paper
Part 1 works fine on its own
Part 2 works fine on its own
BUT together the tray selection does not work
What happens is that sure enough page 1 is printed on headed but everything else
Is printed on copy paper so it looks like the command “.OtherPagesTray = 259 ' quality plain paper
” is ignored or overwritten by “OtherPagesTray = 261 ' thin copy paper”
It appears that the printing is done after all the VB is processed and not stage 1 followed by stage 2
Sub prnt()
' **** part 1 print a document first page headed paper, other pages on plain paper
With ActiveDocument.PageSetup
.FirstPageTray = 260 ' headed paper
.OtherPagesTray = 259 ' quality plain paper
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
'*** part 2 print a copy of the document on copy paper
With ActiveDocument.PageSetup
.FirstPageTray = 261 ' thin copy paper
.OtherPagesTray = 261 ' thin copy paper
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
End Sub
Is there a way to process part one print then move on to stage 2
Or is there a much better way of tackling this problem?
Thanks in advance
Part 1 works fine on its own
Part 2 works fine on its own
BUT together the tray selection does not work
What happens is that sure enough page 1 is printed on headed but everything else
Is printed on copy paper so it looks like the command “.OtherPagesTray = 259 ' quality plain paper
” is ignored or overwritten by “OtherPagesTray = 261 ' thin copy paper”
It appears that the printing is done after all the VB is processed and not stage 1 followed by stage 2
Sub prnt()
' **** part 1 print a document first page headed paper, other pages on plain paper
With ActiveDocument.PageSetup
.FirstPageTray = 260 ' headed paper
.OtherPagesTray = 259 ' quality plain paper
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
'*** part 2 print a copy of the document on copy paper
With ActiveDocument.PageSetup
.FirstPageTray = 261 ' thin copy paper
.OtherPagesTray = 261 ' thin copy paper
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
End Sub
Is there a way to process part one print then move on to stage 2
Or is there a much better way of tackling this problem?
Thanks in advance