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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word: How to reuse small snippets

Status
Not open for further replies.

EdwardMartinIII

Technical User
Sep 17, 2002
1,655
US
I'm using Office 2007.

I have a wide variety of documents to produce -- mostly templates. One of the tricks, though, is that a lot of the templates have shared content, and in some cases, that content is in every one of the documents.

We often change that information, and it can be a pain to go and search through hoping to fix every template.

So, I wondered if it was possible to insert text from a separate document (let's say, a "seed" doc) such that whenever I opened a template, it would update its content from the various seed docs feeding it. That way, if I had to change a sentence about, oh, the company's structure, I just find the seed doc, make that change, save it, and henceforth all templates will reflect the new information.

I tried actually dragging the seed doc into my doc, and that looked like it worked, except it didn't update (and hell if I know how to force an update in 2007 yet) whenever I closed and reopened the doc.

Thoughts? Ideas? Suggestions?


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
As a caveat, what would REALLY make this nifty is if I could make sure that the incoming text would conform to the styles of the template/receiving document.

For example, if this were HTML, then the seed doc would have just plain text, and there would be a CSS that applies only to the template (or receiving doc).

Even if someone acts like a jerk and puts funky formatting in a seed document, it all conforms to the styles of the receiving document.

Thanks!


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
If it is text, you could use INCLUDETEXT fields. INCLUDETEXT can point to bookmarks, so you could have multiple "chunks" in one file (individually bookmarked), and reference them.

Gerry
 
Missed your second post.

"Even if someone acts like a jerk and puts funky formatting in a seed document"

Get a gun and shoot them.

Or in a preferable non-violent way...lock 'em out (as best as possible).

Gerry
 
Can INCLUDETEXT include directives such as italics or bold or other formatting, or must it be entirely plain text?

And yeah, the overall goal would be to lock the heck out of ALL the files.

Thanks!


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Hi EdwardMartinIII,

As Gerry says, you could use INCLUDETEXT fields. Note too that while using INCLUDETEXT fields allows all child documents documents to be updated by editing the parent, you can also edit the field contents in a child document and send those changes back to the parent - which then affects all other child documents. To send the changes back to the parent, simply select the dited field and press Ctrl-Shift-Enter. This could be both a blessing and a curse, depending on your users' reliability.

If you're going to go down this patth, something you'll need to consider is how to preserve the original linked text in documents that have already been finalised. I don't suppose you'll want such documents changing to reflect later changes to the parent document. For this, you'll need to lock (Ctrl-F11) or unlink (Ctrl-Shift-F9) the fields.


Cheers
[MS MVP - Word]
 
Hi Macropod,

My users are completely unreliable.

My plan is to build Word templates and put those templates in a READ-ONLY directory on the network.

You have a good point about workflow, and the plan I'm proposing is that the users open the templates, which do a one-time grab from the parent documents to build the child, and then make the occasional fiddly changes, and save a COPY (as a DOC) to their own folders.

So, if I do this, and then I go and change the parent "seed" doc and then they open up their own version, will that also change the content?

Thanks!

[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Hi Edward,

If the template you create the document from has the INCLUDETEXT fields in it, that'll give the template access to any changes that you make in the parent document. If the template also has a macro in it like:
Code:
Sub AutoNew()
ActiveDocument.Fields.Update
ActiveDocument.Fields.Unlink
End Sub
that'll mean the created document gets the linked data upon creation but thereafter is not affected by any changes to the parent document. The above code is sufficient for any fields in the body of the document, but you'd need something a bit more sophisticated if you've got links in headers, footers and/or textboxes.


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

Part and Inventory Search

Sponsor

Back
Top