Monday, June 23, 2014

Reusing Text in Word 2010 via Bookmarks - Part 2 Getting your formatting right

In my last post on reusing text via bookmarks in Word, I mentioned that there was a problem with the reused text retaining formatting. 

Sure, you can reformat the text to look how you want but when you update it, then new text takes on characteristics of the old.  You end up with text that looks like this....

There's an easy (but not obvious) way to fix this;

Getting into Reveal Codes Mode on Field
So, first we need to know exactly what makes our fields tick.  So, click on one of your fields and then press Alt+F9.  The field will change to show the code.

In my case, the code is;

{REF Title \h \* MERGEFORMAT }

This is more or less the default setting (the word title is the name of the bookmark I inserted).  Mergeformat means that the format of the original text is being merged.

To change this option, simply click on the code and overtype it.
In this case, we're going to change MERGEFORMAT to CHARFORMAT.

Once this is done, Press Alt+F9 to turn reveal codes off and then update your field.  (Remember that print preview is probably the fastest way to do this).

If you apply formatting to your field, it will now update with the rest of the field.

If you're still having trouble, it's worth remembering that Charformat applies the formatting of the first character (in this case, the R in REF), to the rest of the code.  You might want to reveal codes and then apply formatting directly to the word REF.

Thursday, June 19, 2014

How to Reuse Text via Bookmarks in Word 2010 (Update once and have it auto-update throughout the document)

I guess this is a bit of an oldie but I was surprised how many people didn't know about it. 

Why would you do this?
If you find yourself opening old documents and then doing a search and replace to change a name, a date or a version number, then this is the tip for you.  It allows you to write your key information down once and then have it auto-update.

If you do a lot of contracts or quotes - or basically any kind of document based on a template, then you'll find this very handy.

Getting Started (Bookmarking the Original Text).
Open a Word document and type in some useful repeating text;

Customer Name:  MyCompany Limited

1. Highlight that text

2. Select the Insert Tab on the Ribbon.

3. Click the Bookmark Button

A dialog box will appear.

4. Type a name for your bookmark.  
This can be any name but it should be something that you'll recognise when you see it.

5. Click Add.

Inserting the Bookmarked Text
So, now that you have bookmarked some text, it's time to reuse that text in other places in your document.

1. Go to a place in your document where you would like to insert the text.

2. Click on the Tab marked Insert

3. Click on the button marked Cross-reference.

4. In the dialog box, set the reference type to Bookmark.

5. In the big white section, choose the bookmark name that you typed earlier.

6. Click Insert.

Note that the dialog box will not close until you click Cancel.  This is actually quite useful behaviour because it means that if you want to reference the company throughout your document, you can just move the cursor to the next place and press Insert again.  When you've finished, click Cancel.

Updating Text
So, now you have your original text and the reused text.
Try changing your original text.
You can update individual samples of your text by clicking on them and pressing F9 but the best way to update everything in one go is to print preview.  Just Press Ctrl+P and then press ESC.  Your document will be updated.

There are two drawbacks to this method.

1. Fields don't update automatically.
Strangely, this behaviour is by design.  If you find it annoying, you can add a macro to do it for you.  See this article for instructions.

2. Text inserted this way carries the original source formatting. In my experience this is the more annoying problem. In my next post, I'll show you how to change this.

For more on bookmarks, including how to add bookmarks from other documents, see this site.