
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
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?