Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Mail Merge Toolbar

Geek News

Mail Merge Toolbar
Dave C 11/22/2008 4:23:00 PM
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
Re: Mail Merge Toolbar
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 11/23/2008 6:30:11 AM
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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net