2 Way Linking with VBA (or something else)

S

scott123_8

I have 4 documents, each containing similar information- about 80% of the
document repeats itself in all 4 docs. I am trying to find a way to link the
common areas so that when one document is altered (any document), all the
other documents reflect the change as well. In other words, I'd open one
file, it would be the source, and everything else would be the destination.
I'd open the next, and that would become the source.

I have a very rough idea how I'd do it (via bookmarks, defining ranges, and
copying/pasting them) but I get the feeling there might be an easier method.

Any suggestions?

P.S. If anyone wants to see an example of one of my docs, it can be found
here:

http://www.freewebtown.com/enter8/
 
H

Helmut Weber

Hi Scott123_8,

I don't think this is practible.

You may have a master document and
have changes there reflect in client documents,
using fields like:
{ LINK Word.Document.8 "C:\\Documents and Settings\\Helmut
Weber\\Desktop\\Comparison800Mix.doc" "OLE_LINK1" \a \p }

But not make *any* document a master document by opening it.

In theory, it would be possible to update text
anywhere in any other doc by use of a manually started macro
or some auto-macro, or some ontime-macro, whatever,
maybe all methods combined.
A selection-change-event alone is not sufficient.
Might be a nice exercise for showing programming skills,
might work with two or three simple docs,
but for productive use out of the question.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
J

Jay Freedman

In addition to Helmut's comments, you may be able to do what you want
without code.

You can use an INCLUDETEXT field to link one document into another
(most easily by using Insert > File and clicking the down arrow on the
Insert button, and choosing Insert As Link). Let's say you have a base
document called A.doc, and you insert fields pointing to that file in
B.doc and C.doc.

Now, if you make a change in the included text while you're in B.doc,
you can press Ctrl+Shift+F7 to send that change back to A.doc. To get
the change to show up in C.doc, you'd have to go to that document and
update (F9) at least that INCLUDETEXT field.

The difficulty with this scheme would be in remembering to update all
the documents each time you make a change in any of them. Possibly you
could write macros to intercept the Save, Print, and Close events and
do the updates before performing the requested actions.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
S

scott123_8

Thank you Helmut and Jay.

Although I think that, if given the time, I could come up with code that
could synchronize shared areas of multiple docs... for the moment , the
master document idea is a winner. A master document containing all the
shared info with picture links to each document. To edit the shared text,
I'll double click the picture in the destination doc and bring up the master.
I'll be switching back and forth between documents a little more than I'd
like, but it'll give me a code free solution that I can implement right away.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top