Hi =?Utf-8?B?aGxvY2s=?=,
> I created a print button on my document using the technique from
> http://word.mvps.org/FAQs/TblsFldsFms/HidePrintButton.htm. The code is
[quoted text clipped - 5 lines]
> document. I am wanting a button to print the entire document PLUS 2 copies
> of page 2.
The simplest approach would probably be
1. Create a TEMPLATE (*.dot) from which you'll generate a main merge document
each time you need one.
2. Create and save a toolbar in this template (Tools/Customize/Toolbars)
3. Insert a Module into this templates VBA project and copy your macro code into
that
4. Drag this macro into the new toolbar (Tools/Customize/Commands;
Category:Macro)
5. Create another macro to execute the mail merge. At the end of the mail merge,
the macro needs to attach the template to the mail merge result, so that the
toolbar with the button will be available. Something like this:
Sub ExecuteMerge()
Dim doc as Word.Document
Set doc = ActiveDocument
If doc.MailMerge.MainDocumentType <> wdNotAMergeDocument
doc.MailMerge.Execute
ActiveDocument.AttachedTemplate = "C:\Full path\TemplateName.dot"
ENd If
End Sub
6. Put this macro on the toolbar, as well.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)