0

I have 2 word document and I want them to share data, customer name for example. When I update one document I want the data from that document to be shared to the other.

I'm looking into custom xml parts but the xml stores inside the document. Can it be saved outside the document or do I have to write a addin for word?

0

Although there are several built-in mechanisms in Windows Word for including one document's data in another, none of them is a two-way mechanism.

So my assessment is that, yes, you need to write code to do this. Precisely how to do that would depend on what your use case is - e.g. are there two documents, or more documents? Are they all in the same place, or scattered? Are they being modified by a single user, or by multiple users?, and so on.

Going back to the issue of built-in mechanisms, in theory if you have a piece of text bookmarked "mytext" in Document A, you can insert a LINK field in Document B that would get its value from mytext. But altering the the result of that LINK field would not write the data back to Document A. And frankly, LINK fields are better avoided anyway. Or you could get more than one document to include (via an INCLUDETEXT field) a document containing bunch of SET fields, whose values you could then reference using REF fields. But you wouldn't then be modifying the data in one document and seeing the modifications in another - you'd really have to modify the included document, re-include it in both container documents, and update all your REF fields. And again, you have an external dependency that will probably cause you problems if, for example, you need to move all the related documents to a new folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.