Stupid Microsoft Word Trick: Boilerplate Text (Same Source Text, Multiple Instances)

This one is a Word feature cursed by utterly non-intuitive names.  The concept is simple: I want to have the same text repeated multiple times in a document.  I can copy and paste them, but if I change it in one place, I need to find and update all the other instances.  It would make sense that I can do it without having each snippet as a separate file and them OLE-embedding each.

The feature does exist, but it uses the name “Bookmark” for defining the master copy and “Cross-Reference” for the copies.  Of course that’s what you’d look for when you’re looking for [sarcasm] how to boiler plate or replicate or use some text as templates.  (I’m trying to come up with some search terms people might use in hopes others who want to do this function can find this article via search engines.)

This is what we’re trying to do.  We have the step “Deploy Admin Package” for each server role, but the specific directions seem to change with each build.

 

Let’s start with our server types

image

Now, this is purely a matter of preference, but I prefer to have my boilerplate source in a separate section in the document.  That way, I don’t have to look for the first instance of some block of replicated text.

image

In fact, I like to keep each block of text in a separate table cell.  That way I don’t have to worry where a chunk of source text begins and ends.

image

Now, let’s populate it.

image

Select the first cell, then Click on Insert | Bookmark.  (Alt, N, K)  Enter a name for the bookmark.  Note that you cannot use spaces in the name, hence the use_of_underscores.  I haven’t found how to rename bookmarks after creating them, so think about your naming scheme a bit first.  Otherwise, remember the motto: “There isn’t enough time to do it right; there’s always enough time to do it over.”

image

Normally, I create bookmarks as I go (resulting in a jumbled mishmash of bookmark names), but here I’ve created them all before use.

image

Now, let’s use them.

- All servers need to have the Monitoring Agent installed

- Web and Media servers are externally-facing, so they need the Security Hardening

- DB and File servers need backing up.

- Media, DB, and Print servers have dedicated peripherals attached to them.

This means the Web Server needs the Monitoring Agent, and the Security Hardening.  Click where the Monitoring Agent boilerplate text goes, then References | Cross-Reference. (Alt, S, RF)

image

Ensure

- “Reference Type” is “Bookmark”

- “Insert reference to” is “Bookmark text”

- Insert as hyperlink is not checked.

Then, select the bookmark to the boilerplate text and press “Insert”.

image

Repeat for Security Hardening.

image

Now, repeat for all rules and roles.

Oh!  The title of each step has to be a Heading 2!

Okay, go to the Boilerplate section and make your changes to the master copies.

image

Next, press Ctrl-A to select all, then right-click and select “Update Field” in the resulting menu.

image

(Note, if you have a TOC or TOA, you may get another challenge to update just the page numbers only, or update the entire table.  I’ll leave that to your discretion.)

Let’s look at it under Outline View. (Alt, W, U)

image

Oddly enough, the Heading 2 lines in the Boilerplate section don’t show.  It doesn’t matter.  We’re going to hide it, anyhow.

One warning: if you have visual glyphs turned on (Alt, H, 8) this won’t work.  Paragraph marks and other formatting marks trumps hidden text.

image

Select the whole Boilerplate section.  It’s very easy to do in Outline View.  Select the whole word ‘Boilerplate’, then right-click.  Select “Font” in the resulting menu.

image

In the resulting Font dialog box, select “Hidden”. 

image

That’s it!

image

To unhide it, select the entire document (Ctrl+A), right-click, then select “Font” in the resulting menu.

image

The resulting dialog box has ever Effects option in a half-and-half state.  Clear the check box for “Hidden”.

image

That’s it!

Note that you cannot unhide just a single selection.  You can only unhide all hidden text in the document.  This is why I have a single “Boilerplate” section – so I can hide/unhide it en masse.  Additionally, if you’re using yesterday’s nested numbered headings trick, the Boilerplate section will throw off the Heading 1 sequence unless it’s the very last section.  You could omit to make it under a Heading, but then Outline View won’t collapse it neatly.

Boilerplate Example.docx