Word – Microsoft Word Variable without Macro

microsoft-word-2007

Is there a way in MS Word 2007 (& up) to have a document variable that I can define and have updated across the document when I update that variable's value. For example:

My crazy neighbor has <CRAZY_CAT_VAR> cats!!!

I want to be able to define <CRAZY_CAT_VAR> as 9 and be able to have the document print/show 9 instead of <CRAZY_CAT_VAR>. I believe I've seen solutions where I can define variables in one of the document macros and then reference them using fields, but I'd prefer to do this solely via a GUI if at all possible.

Best Answer

I'm fairly sure Document Variables can only be set through macro, therefore since that is not a "GUI" option that is counted out.

You could achieve the same using Document Properties.

  1. Click the Word Ribbion.
  2. Choose Prepare.
  3. Choose Properties.
  4. In the panel that appears click the Document Properties button and choose Advanced Properties.
  5. Go to the Custom tab.
  6. Enter in a name and value for the property and press Ok.

Now insert a DOCPROPERTY field with the name you chose and you can display this information wherever you want in your document. If the value changes you can update the fields and the values will change in the document too.

One thing to note is I think that these properties are visible when you right click on the document in Windows Explorer and look under Properties.

Related Question