Problem with Template printing

C

Cam Evenson

We use a default template to print out a series of pages. Intially the
template worked great as there was only 3 pages to print out. But over time
a 4th page was entered in the template and this has resulted in a great many
problems trying to get the 4th page to print. Thus resulting in a lot of
extra paper printed to get the 4th page to print. Is there a better way to
build the button's code to accomidate pages? maybe make it intuitive? The
code under the button is as follows:

Private Sub CommandButton1_Click()
Application.PrintOut FileName:="", _
Range:=wdPrintCurrentPage, _
Item:=wdPrintDocumentContent, _
Copies:=1, _
Pages:="", _
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, _
Collate:=True, _
Background:=True, _
PrintToFile:=False, _
PrintZoomColumn:=0, _
PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

Application.PrintOut FileName:="", _
Range:=wdPrintRangeOfPages, _
Item:=wdPrintDocumentContent, _
Copies:=1, _
Pages:="2-3", _
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, _
Collate:=True, _
Background:=True, _
PrintToFile:=False, _
PrintZoomColumn:=0, _
PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub

Sometimes we only want to print out page one, and other times page 2-3 but
there is a 4th page now. And sometimes we only need the 4th page. Could this
button be coded to be smarter? Is there any good reference on the commands
needed to code in Word?

If all the pages where built as seperate templates is there a way to have a
master template that calls them all when all need to be printed? And yet is
coded to be selective?
 
D

Doug Robbins - Word MVP

Your (almost) identical question has been answered in the userforms
newsgroup. Please do not post the same question separately to multiple
newsgroups.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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

Top