O
OriRefugee
I'm AB-SO-LUTE-LY stumped, banging my head against the wall, and am
begging (BEGGING, I SAY) for help!!!!!!
I created a dynamic Word Mail Merge letter with Bookmarks but,
regardless of the size of my data file, ONLY two records are merged
(regardless of where I start in the data file).
I'm using Word 2002, standard "WritetoBookmark" sub (see below) called
from the "WdApp_MailMergeBeforeRecordMerge" event of a class.
Everything (besides this) looks like it's behaving correctly. All
records merge when the call to this sub is commented out, uncomment
it, BAM -- only two records are merged. Originally started with > 1
bookmark, but pared everything down to troubleshoot -- tried
everything and am COMPLETELY perplexed. SEND HELP!
-----------------------------------------------------------
Sub WriteToBookmark(doc As Word.Document, _
bkmName As String, bkmValue As String)
Dim rng As Word.Range
Set rng = doc.Bookmarks(bkmName).Range
rng.Text = bkmValue
doc.Bookmarks.Add Name:=bkmName, Range:=rng
Exit Sub
End Sub
begging (BEGGING, I SAY) for help!!!!!!
I created a dynamic Word Mail Merge letter with Bookmarks but,
regardless of the size of my data file, ONLY two records are merged
(regardless of where I start in the data file).
I'm using Word 2002, standard "WritetoBookmark" sub (see below) called
from the "WdApp_MailMergeBeforeRecordMerge" event of a class.
Everything (besides this) looks like it's behaving correctly. All
records merge when the call to this sub is commented out, uncomment
it, BAM -- only two records are merged. Originally started with > 1
bookmark, but pared everything down to troubleshoot -- tried
everything and am COMPLETELY perplexed. SEND HELP!
-----------------------------------------------------------
Sub WriteToBookmark(doc As Word.Document, _
bkmName As String, bkmValue As String)
Dim rng As Word.Range
Set rng = doc.Bookmarks(bkmName).Range
rng.Text = bkmValue
doc.Bookmarks.Add Name:=bkmName, Range:=rng
Exit Sub
End Sub