search
top

How to Create Custom Document Properties in Word 2010

What is a Document Property?

I started to explain what a “custom document property” was, then realized Dani at BlogBookTours would probably just send me to my room again if I didn’t start with the basics. In Microsoft Word, document properties are all those things that describe various attributes of your document – title, author name, how long you’ve spent editing it, and so on. They are stored as “fields” that can be used within the document. If you’ve ever inserted automatic page numbers, you’ve used fields.

Custom document properties can be added and used to store additional information as needed. I use them, sometimes, as variables – for example, when writing a story where a name or character attribute (eye color, favorite food) might be mentioned many times, but is likely to change between first and final draft. Being able to update everything at once can save a lot of searching and replacing.

To view the document properties, click the File tab, then click Info. To view, add, or change Advanced Properties, click Properties > Advanced Properties (highlighted below):

Word 2010 Document Properties

How Do I Add My Own Custom Document Property?

From the Custom tab in the Advanced Properties dialog, you can add, delete, or modify properties:

word-doc-properties-define2a

You can see that Hero has already been added. Let’s give Johnny a Heroine:

word-doc-properties-define3a

  1. Type a Name for the property. This might be Main Character, Villain, Hero’s Mom – whatever. This is not where you put “Bob” or “Queen Petunia.”
  2. Value is where you enter the text that should appear in your manuscript when you insert this custom property, if you’re planning to use it as a variable. Let’s call our Heroine “Jennifer.”
    NOTE: For most custom document properties, you can just leave the default Type: Text.
  3. Click Add. Repeat Steps 1 – 3 as needed.
  4. Click OK.

Using a Custom Document Property as a Variable

Now, if you want to insert this new document property (variable) into your manuscript, put your cursor where you want to place it (1) and, from the Insert menu, click Quick PartsField (2):

word-doc-properties-define5a

The Field dialog appears:

word-doc-properties-define6a

  1. Click DocProperty.
  2. Click the name of the Field property (the custom property you added should appear in the list).
  3. Click OK.

You can copy this variable, now, simply by highlighting it, then using CTRL+C to copy and CTRL+V to paste it. But that’s not very convenient, is it?

keepcalm

Creating a Macro & Shortcut for Frequently Used Variables

This is the fun thing about writing technical documentation on a blog – I can suggest that you get comfy and have a drink before attempting this next bit.

The goal is to use a two- or three- character keyboard shortcut to insert the names you use often enough to make variables out of them. So first, we have to create a macro (a very simple little program) to do the same steps we did, above, to insert the variable where we wanted it to appear.

Next, we’ll have to assign it a shortcut key. All this sounds very simple, right? No? Okay – drink up, let’s get started!

Enable the Developer Tab

If you do not see a tab across the top of your Word 2010 ribbon that says “Developer,” do this next bit first. If you already have the Developer tab, take another shot of your favorite drink and skip right to Record a Macro.

From the File tab, click Word options. The following dialog will appear:

word-doc-properties-define9a

 

  1. Click Customize Ribbon.
  2. Under Customize the Ribbon, select Main Tabs and locate Developer (circled above). Click the checkbox to enable the Developer tab, then click OK.

Record a Macro

word-doc-properties-define10a

  1. Click the Developer tab.
  2. Click Record Macro.

word-doc-properties-define11a

  1. Name your macro and type that in Macro Name. Don’t get fancy – avoid spaces, punctuation marks, and all that garbage that makes for a good, strong password. Keep it simple and memorable.
  2. Choose Button or Keyboard. (It probably doesn’t make a darned bit of difference, but in case it does – I chose Button.)
  3. Choose where to store your new macro. If you want to use it everywhere, choose Normal.dot. If it’s specific to your novel, choose the current manuscript. Do try to remember where you put it, because I won’t be able to tell you, in the morning.
  4. Last, but not least, write up a short Description of what the macro is supposed to do. (For now, we’ll just go on blind faith that it will actually do that.)
  5. Click OK.

If you’ve made it this far, you deserve a medal. Pour yourself another shot and scream, “Whoopie for me! Hurray!”

Now, do exactly the same things you did to insert the variable into your manuscript, the first time. Be aware that every keystroke you make, now, is being recorded as the new macro – so try not to screw it up. Here, as a refresher:

From the Insert menu, click Quick PartsField (2):

word-doc-properties-define5a

The Field dialog appears:

word-doc-properties-define6a

  1. Click DocProperty.
  2. Click the name of the Field property (the custom property you added should appear in the list).
  3. Click OK.

Click the Developer tab and click Stop Recording.

Okay…but now what? Now, right click somewhere blank on the ribbon – where the golden arrow is, below, would be good:

word-doc-properties-define10b

Click Customize the Ribbon.

word-doc-properties-define14a

  1. Under Choose commands from, select Macros.
  2. Click the macro for which you want to assign a shortcut key combination.
  3. Click Customize.

word-doc-properties-define12a

  1. Under Categories, select Macros.
  2. Under Macros, select the one for which you want to assign a shortcut key combination.
  3. Highlight the text box under Press new shortcut key, then – oh, c’mon, you know what to do! Press some key combination you want to use wherever you want to insert your variable. I used Alt+J – it didn’t appear to be doing anything at the time. (If you press a combination that is already in use by some feature of Word, you will see what it’s used for next to Currently assigned to, right under Current keys.)
  4. Click Assign.
  5. Repeat Steps 2-4 for every macro you’ve recorded. Click Close when you’re done.

Test this by placing your cursor in the document and pressing your chosen key combination (ALT+J if you followed my example exactly). Does it insert the contents of your custom variable? If so, pat yourself on the back and take a break! You’ve done it!

Modifying the Contents of the Variable

Now, say you’ve inserted this everywhere you mention your hero or heroine in a 1000 page novel. And now you want to change their names. Instead of searching and replacing, simply go back to your Advanced Properties dialog:

word-doc-properties-define4a

  1. Select the appropriate property.
  2. Change the Value.
  3. Click Modify.
  4. Click OK.

To update all fields at once (your Document Properties are also Fields), just highlight all (CTRL+A) and press F9 (update fields).

Want the sample files?

Download them! Hero and Heroine names are already created – along with macros to insert them. Follow the steps in this post to create and add more or to modify the name values.

Contest Entry Word Template (.dotm – macro-enabled template format; save this in your Word templates directory

Contest Entry Word Document (.dotm – macro-enabled document format)

HollyJahangiri

Holly Jahangiri is the author of Trockle; A Puppy, Not a Guppy; Innocents & Demons; and A New Leaf for Lyle. You can find her books on Amazon at http://amazon.com/author/hollyjahangiri. For more information on her children's books, please visit http://jahangiri.us/books.

Latest posts by HollyJahangiri (see all)

Please share this post!

2 Responses to “How to Create Custom Document Properties in Word 2010”

  1. Kyashilah says:

    Very detailed!

    I’m pretty sure I could follow along.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

top
%d bloggers like this:

By continuing to use the site, including by scrolling this page or navigating elsewhere within this site, you agree to the use of cookies. For more information, click here.

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this. (You should see this notice no more than once a month.)

Close