Variable text field (Word 2007)

S

Sesquipedalian Sam

I would like to create some sort of "variable" in Word 2007 that I can
put in multiple places in my document. If I change the value (text
string) of the variable, all the instances will change.

I looked at document variables, but they seem to require a macro,
which I would prefer to avoid.

I tried to use the DocVariable field, but must have done something
wrong.

Can someone suggest what feature I need and briefly how to get
started?
 
S

Sesquipedalian Sam


Excellent. Thanks.

I tried the DocProperty alternative. I think it will serve my needs.

There is one little glitch. I created a template with a DocProperty
named "Document Title". I put a reference field at the top of page 1
(not in the header so I can see it in Draft layout) and in the headers
of pages 2+.

If I create a new document using that template and change the
DocProperty value, the reference fields don't get updated unless I
manually select them and press F9. And if I select the entire document
(Ctrl-A), even in Page layout, the references in the headers/footers
do not get updated.

Is there a way to get Word to update the fields when I change the
DocProperty value?

Thanks




PS: There are a lot of typos in that article. ;-)
 
S

Suzanne S. Barnhill

No, but switching to Print Preview will update the header, and there are
macros around that will update all fields throughout the document. In fact,
I thought Greg had one at his site, but I'm not finding it now. But if you
google for "update all fields word," you'll see several offerings. The one
at http://www.vbaexpress.com/kb/getarticle.php?kb_id=108 seems simple
enough. Or see
http://www.devblog.com/2007/12/update-all-fields-in-word-document.html

Ah, it's Graham Mayor who has it, as an illustration in his "Idiot's Guide
to Installing Macros" at http://www.gmayor.com/installing_macro.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
S

Suzanne S. Barnhill

Ah, thanks, Greg. I thought I remembered a separate page for it and was
looking for "Update..."

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top