Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Paragraphs in Multiple Word Docs 2

Status
Not open for further replies.

owizard

Programmer
Feb 19, 2002
13
GB
Hi,

Is it possible to link paragraphs in multiple word documents? I would like to link them in such a way that if a paragraph in the master document is updated, the same paragraph is automatically updated in multiple child word documents.

I am using office 2003. I need to create one master document and up to 100 child documents, which can automatically grab changes from the master document. Thanks a lot.
 
Thanks a lot for that tip. That's exactly what I needed. Now, I would like to know how I could programmatically open the child documents (more than 100), update the fields, save the documents and close them. Is there any simple way of doing it? Any tips will be really appreciated. Thanks.
 
Hi owizard,

There's no way for a given Word document to 'know' what other files might be linked to it. You'd have to supply that information yourself - or programmatically test every possible file for a link to the source document. Of course, if the target files are all in the same folder, it'd be a simple matter of looping through all files in that folder, opening them in turn, applying '.Fields.Update', then saving and closing the open document. Actually, if Word is set up to update links upon opening, you wouldn't even need the '.Fields.Update' code. Which raises another point - if Word is set up to update links upon opening, why bother with the macro - the files will update next time they're opened anyway.

Also, FWIW, with INCLUDETEXT fields you can edit the linked data and then, by selecting the field and pressing Ctrl-Shift-F7, propagate the edit back to the source document.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top