Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
AMR AMR is offline
external usenet poster
Posts: 6
Default MailMergeDataSource iteration extremly slow


I'am reading addresses from a MailMergeDataSource in Word 2007.
My problem is, that this is extremly slow. Every invoke from get_Item will
take a sec.
The app is a C# Word 2007 Application Add-In.

Is there some solution to speed it up or an another approach to solve the


object indexLastname = MailMergeDataFieldIndices.Lastname;
object indexFirstname = MailMergeDataFieldIndices.Firstname;
object indexCompany = MailMergeDataFieldIndices.Company;
object indexStreet = MailMergeDataFieldIndices.Street;
object indexZip = MailMergeDataFieldIndices.Zip;
object indexCity = MailMergeDataFieldIndices.City;

object index = MailMergeDataFieldIndices.None;
for (int i = 0; i count; i++) {
string name = fields.get_Item(ref indexFirstname).Value + " " +
fields.get_Item(ref indexLastname).Value;
string company =fields.get_Item(ref indexCompany).Value;
string street =fields.get_Item(ref indexStreet).Value;
string zip = fields.get_Item(ref indexZip).Value;
string city = fields.get_Item(ref indexCity).Value;

dataSrc.ActiveRecord =
Word.WdMailMergeActiveRecord.wdNextDataSourceRecor d;

Thanks in advance

Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template - slow loading text and slow when typing Cheryl Seavers Microsoft Word Help 0 July 16th 09 10:55 PM
Help! Slow Word & PP Slow: New Comp pdfernan Microsoft Word Help 0 June 28th 07 02:44 PM
Word:Entering data into a Table very slow, cursor moves very slow Dutt Tables 2 August 3rd 06 04:50 AM
Slow bh6690 Microsoft Word Help 1 March 28th 06 05:53 PM
Word is slow to open and very slow to close Stu20 Microsoft Word Help 1 September 21st 05 04:13 AM

All times are GMT +1. The time now is 10:59 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright ©2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.

About Us

"It's about Microsoft Word"