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 / July 2006

Tip: Looking for answers? Try searching our database.

Mailmerge processes only 2 records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeroen - 25 Jul 2006 12:51 GMT
Somehow the mailmerge processes only 2 records when I use
MailMergeBeforeRecordMerge event. In my main document I've got two tables
with each a bookmark. In the MailMergeBeforeRecordMerge event I want to
populate this tables with data:

           lstraFields = Split(lstrInvalidDoc, "||")
           
           For lnIndexFields = 0 To UBound(lstraFields)
               lstrField = lstraFields(lnIndexFields)
               
               With doc.Bookmarks(pstrTableName).Range.Tables(1)
                   .Cell(.Rows.Count, lnIndex).Range = lstrField
               End With
           Next

But somehow due to this insertion of the cell the mailmerge stops after two
records. If I remove the insertion of the cell and then loop through the code
with breakpoints, all records are processed.

Any ideas?

Kind regards,

Jeroen Walstra
Cindy M  -WordMVP- - 25 Jul 2006 15:26 GMT
Hi =?Utf-8?B?SmVyb2Vu?=,

Somewhere, you have a line of code that contains mailmerge.Execute. The Execute
method has a Pause argument. Try setting this to FALSE.

> Somehow the mailmerge processes only 2 records when I use
> MailMergeBeforeRecordMerge event. In my main document I've got two tables
[quoted text clipped - 14 lines]
> records. If I remove the insertion of the cell and then loop through the code
> with breakpoints, all records are processed.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)
Jeroen - 26 Jul 2006 10:08 GMT
Hi Cindy

I've tried to set Execute to False, but then only one record seems to be
merged and it creates a second blank page...

I'm really stuck on this issue, so I hope you've got some more ideas.

Jeroen Walstra

> Hi =?Utf-8?B?SmVyb2Vu?=,
>
[quoted text clipped - 27 lines]
> This reply is posted in the Newsgroup; please post any follow question or reply
> in the newsgroup and not by e-mail :-)
 
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.