View Single Post
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graywolf Graywolf is offline
external usenet poster
 
Posts: 22
Default Need merge doc to run a macro

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.