Creating Merge Field Chooser

M

Mike9900

Hello,

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.
 
C

Cindy M -WordMVP-

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 :)
 
C

Cindy M -WordMVP-

Hi Mike,
Thanks for the reply, we use Word 2003.
--
OK... And what's the data source?

Are you a programmer/developer? Or are you expecting a "ready-made" solution from
this group? Please note that these groups are here to help you solve a problem,
but not to provide free consulting services. I will NOT provide you with the full
solution, just point you to the programming properties and methods you require.

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 :)
 
M

Mike9900

Hello,

Thanks for the reply.

We only need the direction, please. We are programmer.
 
M

Mike9900

Data soource is a text file.
--
Mike


Cindy M -WordMVP- said:
Hi Mike,

OK... And what's the data source?

Are you a programmer/developer? Or are you expecting a "ready-made" solution from
this group? Please note that these groups are here to help you solve a problem,
but not to provide free consulting services. I will NOT provide you with the full
solution, just point you to the programming properties and methods you require.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?TWlrZTk5MDA=?=,
Data soource is a text file.
Word 2003
OK, to get started, record a macro while linking to the data source (point 3).

The basic code to pick up the list of fields you'll find in the Mail merge FAQ on
my website, the Word 2002/2003 section, under "Display list of merge fields in a
non-modal dialog box". There's a sample file you can download.

Then all you need to do is put it all together...

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 :)
 

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