View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Need merge doc to run a macro

Instead of executing the mail merge, you might consider a variation of the
method in the article €śCombining FormFields and Mail Merge€ť on the following
page of fellow MVP Graham Mayors website:

http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

There might also be some code of interest to you in the article on the
following page of fellow MVP Graham Mayors website:

http://www.gmayor.com/ManyToOne.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Graywolf" wrote in message
...
I'm running Word 2003 SP3. I have a VB6/SP6 program that runs some
queries
to get the needed data and then it takes a Word Merge document, connects
it
to the datasource, and merges the data. It all works fine. Now I need to
enhance the merge. Part of what the VB program does is build a table in
the
merge document that is basically a checklist. I need to have some of the
items in the checklist 'pre-checked' if you will. If every letter of the
merge had the same prechecked items it would be no problem, but I need to
change the prechecked items on each letter based on the recipient of the
letter. I thought I could create a macro in the merge document that would
run
for each record merged and let the macro build the checklist and either
check
or leave unchecked the items on the list based on the record being merged.
That macro would need to reference merge fields. Have no idea how to get
macro to run for each merge record, and don't know how to reference the
merge
fields in the macro to do 'if..then... else' statements, etc.
Any help would be greatly appreciated. Thanks in advance.