View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Excel Data Source Changes not reflected in the Mail Merge

It seems like the data is
in memory somewhere and the Word doesn't bother to re-connect to the
spreadsheet again.


I would suggest that somewhere in your Excel or Word macro you add code to
re-connect to the data source using Word's OpenDataSource method, and see if
an error occurs when the method is executed. You will probably need to patch
the Windows registry to get the OpenDataSource to work at all - see

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document"
at
http://support.microsoft.com?kbid=825765

It may also be useful to find out (and tell us) the values of

ActiveDocument.MailMerge.Datasource.Name
ActiveDocument.MailMerge.Datasource.ConnectString
ActiveDocument.MailMerge.Datasource.QueryString

Peter Jamieson
"Dave Baxandall" wrote in message
...
I'm using Excel and Word 2003 on XP. I've created an Excel spreadsheet
that
uses macros to call macros in a Mail Merge template document. After the
mail
merge document is created I close the template and all that is left is the
new document and the Excel spreadsheet.

My problem is that this works fine the first time but if I close the new
merge document, make changes to the spreadsheet and rerun the excel macros
the changes to the spreadsheet are not displayed. It seems like the data
is
in memory somewhere and the Word doesn't bother to re-connect to the
spreadsheet again. I've even but in a save and wait command in Excel but
it
makes no difference.

--
Thanks in advance
Dave Baxandall