Default number of copies for templates

T

TKF

I use WORD 2002. I'm creating *.dot templates and I want to submit the
number of copies to be printed when using the template in the word
document. So, when I want 3 copies it should submitted by the template
to WORD and when I print, it should always print 3 copies and not 1 as
the default setting is.
Is there any help ?
 
L

Lynn

Hi TKF - you can do this by using VBA. Open your template, click on
Tools, Macro, Visual Basic Editor. When the VB Editor Opens, on the
left hand side you should see a project explorer and your template
should appear with a plus sign beside it. Click on the Plus sign then
click the Plus Sign beside Microsoft Word Objects and double click
"This Document". In the white area to the left type the following:

Option Explicit
Sub FilePrint()
With Dialogs(wdDialogFilePrint)
.NumCopies = 3
.Show
End With
End Sub

Sub FilePrintDefault()
ActiveDocument.PrintOut Copies:=3

End Sub

The first procedure "FilePrint", highjacks the File Print dialog box
and pre-sets the Number of Copies to 3.
The second procedure "FilePrintDefault" highjacks the print icon on the
Standard Toolbar and prints three copies when you click on it.

Close the VB Editor and save your template. When you create a document
based on this template, the above two procedures will kick in.

Hope this helps.
Lynn
 
T

TKF

Thanks Lynn,

its almost what I wanted. but, after creating the document via the
template, the user may want to make any amendments on the new document
and after print it out.

Question: how can I make sure, that the print comes out 3 times ?

Now I build it in and after opening MS WORD he comes right with the
print dialogue or print it out directly.

thanks for your help.....

Thomas
 
T

TKF

Sorry ...

Lynn, thanks for your great help..... I got it now. I was not using the
VBA Editor, but my own program. Now having it in the VBA Editor it
works perfectly.

I will pass you my mail. May you can help me on some other matters, if
needed.

Thanks.

Thomas

(e-mail address removed)
 

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