Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2004

Tip: Looking for answers? Try searching our database.

Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
@ - 09 Aug 2004 13:14 GMT
Is there a way to run a macro before (or after) each record is merged.
Is there a way to read the merge fields into the macro
Graham Mayor - 09 Aug 2004 13:52 GMT
What is it that you are trying to achieve?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Is there a way to run a macro before (or after) each record is merged.
> Is there a way to read the merge fields into the macro
@ - 09 Aug 2004 15:39 GMT
I would like to run some test on the merge field and then pass stuff
back to the merge.  The skipif and nextif statements are too limited

>What is it that you are trying to achieve?
Graham Mayor - 09 Aug 2004 16:44 GMT
It's like drawing teeth :(
What stuff?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I would like to run some test on the merge field and then pass stuff
> back to the merge.  The skipif and nextif statements are too limited
>
>> What is it that you are trying to achieve?
@ - 09 Aug 2004 19:29 GMT
No its not... trust me I am also a dentist so I know (hope this will
not stop you from helping) but I also do some programing

Well you ask for it...The program we use has limited reporting ability
but a good mail merge  program.  We are trying to generate letters
with certain parameters

The actual criteria are complicated so I will make some up. For
instance, send a note to some who has not been in for a year or who
has not been in for six months if their last visit was  an emergency
visit but do not send it if they asked not to recieve a letter. We are
able to get all this information from the mail merge module but it can
not selectviely filter it.  Since mailmege does not support skipif in
an if statement I thought If i could use VBA  to test for it an send
back a single variable telling the mail merge whether to skip that
record or not.

Got it? :)

>It's like drawing teeth :(
>What stuff?
grep - 09 Aug 2004 21:26 GMT
Sounds like you'd be better off doing much of that in the other program
you use; the one with the the good mail merge program. Let *it* do the
work of determining which records to export, and then let Word just
import whatever it says.

grep

> No its not... trust me I am also a dentist so I know (hope this will
> not stop you from helping) but I also do some programing
[quoted text clipped - 17 lines]
>>It's like drawing teeth :(
>>What stuff?
Peter Jamieson - 09 Aug 2004 22:42 GMT
If it's Word 2002 or 2003 you can use the Word Mailmerge object's Events in
VBA to do a number of things at various points during a merge.
A starting point is

http://support.microsoft.com/default.aspx?scid=kb;en-us;285333

specifically the MailMergeBeforeRecordMerge Event

However, that option isn't available in Word 2000 or earlier.

If you're not familiar with Event code in VBA I would have a look at the
Word VBA Help examples.

Signature

Peter Jamieson

> No its not... trust me I am also a dentist so I know (hope this will
> not stop you from helping) but I also do some programing
[quoted text clipped - 17 lines]
> >It's like drawing teeth :(
> >What stuff?
Graham Mayor - 10 Aug 2004 07:12 GMT
I have no problem with dentists but see how much more help you get when you
tell us what it is you are trying to do. :)

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> No its not... trust me I am also a dentist so I know (hope this will
> not stop you from helping) but I also do some programing
[quoted text clipped - 17 lines]
>> It's like drawing teeth :(
>> What stuff?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.