Mail merge events

S

Shay

I am running the mail merge sample from
http://homepage.swissonline.ch/cindymeister/MergFram.htm
which demonstrate events raised in mail merges. Howver only 2 records of th
9 are returned in the mail merge if there is any code entered into the
appWd_MailMergeBeforeRecordMerge event method. When I comment out these lines
all records are displayed in the merge. Is this a bug and is there a
workaround?

Private Sub appWd_MailMergeBeforeRecordMerge( _
ByVal doc As Document, Cancel As Boolean)
Dim szInitial As String, szFirstName As String
szInitial = GetInitial(doc)
PutInBookmark doc, "txtFirstName", szInitial
End Sub
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2hheQ==?=,
I am running the mail merge sample from
http://homepage.swissonline.ch/cindymeister/MergFram.htm
which demonstrate events raised in mail merges. Howver only 2 records of th
9 are returned in the mail merge if there is any code entered into the
appWd_MailMergeBeforeRecordMerge event method. When I comment out these lines
all records are displayed in the merge. Is this a bug and is there a
workaround?
Have you tried explicitly setting Cancel to False?
Private Sub appWd_MailMergeBeforeRecordMerge( _
ByVal doc As Document, Cancel As Boolean)
Dim szInitial As String, szFirstName As String
szInitial = GetInitial(doc)
PutInBookmark doc, "txtFirstName", szInitial
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
S

Shay

I have tried that and it still returns the 2 records. I know you had a
discussion about this with someone (by the name of OriRefugee) with the exact
same problem on the Forum WordTip.com

check out http://tinyurl.com/75sdf

however there was never any solution shown in the discussion thread. Again
my setup is Word 2002 10.6612.6735 SP3..

I would be extremely grateful if you could help me out AGAIN on this one.

thanks

Seamus
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2hheQ==?=,

All I can say is that I've had the problem, and it always turned out to be an
error somewhere in my code (not necessarily in that procedure). Stepping
through, thinking about everything that was happening at the time, I always
managed to track it down. Eventually.
I have tried that and it still returns the 2 records. I know you had a
discussion about this with someone (by the name of OriRefugee) with the exact
same problem on the Forum WordTip.com

check out http://tinyurl.com/75sdf

however there was never any solution shown in the discussion thread. Again
my setup is Word 2002 10.6612.6735 SP3..

I would be extremely grateful if you could help me out AGAIN on this one.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top