Hi Mike,
We want the user to be able to create her own templates by selecting
available Merge Fields from a dialog. Is there a code we can use?
For example, when the MS Word document opens, a floating dialog shows all
the available Merge Fields and the user selects.
You can code this, yes. If you want more than such a simple answer, you do
have to tell us in which programming environment you're working and which
version of Word is targeted.
"Code we can use": none ready-made I'm aware of, since these kinds of things
are rather customized. Years ago, I wrote an article for a now-defunct
magazine that described, in general terms, how this can be done. To
summarize:
- create an Word Addin (either template or COM)
- in it, you have a toolbar button, linked to code, that displays a
non-modal form. OR you can have a dropdown list in the toolbar.
- the code links to the database you provide for the mail merge; either
an ADO link, or it links to the current document (template) for the mail
merge
- it retrieves a list of fields and displays them in the list on the
form or toolbar
- when the user selects a field, the code then inserts a Mergefield into
the Word document, at the current selection point.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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
