Reply
 
Thread Tools Display Modes
  #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.
  #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.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add CC addresses in Macro Merge GeorgeA Mailmerge 1 June 23rd 09 10:35 PM
Macro Field Merge what do I use Frustrated Microsoft Word Help 1 February 13th 09 12:41 AM
Macro Problem With Merge Matthew W Mailmerge 3 July 10th 08 12:49 PM
Merge macro monkey harry Mailmerge 2 May 5th 06 06:25 AM
Macro after merge Michelle Microsoft Word Help 5 April 12th 06 02:55 PM


All times are GMT +1. The time now is 04:47 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"