Template troubles

C

Cam Evenson

I have a user template file that is used to make instructution sheets for
the completion of work tasks. The template has a button on it that ads the
user in printing out other attachments that are always printed when
instruction sheets are printed. For the most part this template has worked
great and has not resulted in any complications until now. Some of the
instructions that have been written have overflowen to 2 or more pages and
the current button prints the current page with the attached sheets but
neglects the remaining pages. So now the user has to go to Page 2 and so on
and press the button again on those pages to print the pages out which
results in the attached pages being printed once again.

Is there a way to code this button first of all so it only appears on page
one of the document, and that it can understand that if there is more then
one page within this document that those pages will be printed also along
with only one copy of the attached files?

I have attached the code found under this button.

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
 
S

Stefan Blom

Please ask in a programming newsgroup, such as
microsoft.public.word.vba.general, where you are more likely to get a
knowledgeable reply.

--
Stefan Blom
Microsoft Word MVP


in message news:[email protected]...
 

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