A custom button saved in a template will be available to the template and documents created from it. If you want the macro it calls to only run in a merge source document then add a line or two to the start of the macro
If ActiveDocument.MailMerge.MainDocumentType = wdNotAMergeDocument Then MsgBox "This function is for mail merge source documents only", vbExclamation, "Not a merge document" Exit Sub End If
The MsgBox line is optional.
-- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Dave C wrote:
[Quoted Text] > I have added an button to the mail merge toolbar that runs a macro. > When I merge to a document the native button on the tool bar become > inactive but the 'custom' button does not. Is there a way I can > disable the custom button so it is not available on the merged > document? > > Thanks for any help. > > Dave
|