Referencing fields in footers

F

Frank Mazzola

Is there any way to reference a variable field in a word document and
put it into the footer? Thanks.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < Frank Mazzola > écrivait :
In this message, < Frank Mazzola > wrote:

|| Is there any way to reference a variable field in a word document and
|| put it into the footer? Thanks.

Could you explain what you mean by:

"way to reference a variable field"

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
F

Frank Mazzola

Yes. I have a procedure report with a text field with a patient's
name and another with his/her date of birth. The report is 2 or 3
pages. I want the name and date of birth to appear in the footer of
all 3 pages. Thanks.
-Frank
 
D

Doug Robbins

If by text field you mean a formfield, unless you deleted the bookmark name
from its Properties, it will have a bookmark name so that you can insert a
cross reference to the text of the bookmark. In the Properties dialog for
the formfield, check the Calculate on Exit box so that the cross references
in the document are updated with the data entered into the formfield. With
the cross references in the header/footer however, that may not cause the
field to be updated and you may need to do a print preview. You could run a
little macro on exit from the formfield to open printpreview and then close
it.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
F

Frank Mazzola

Yes, it is a formfield. The trouble I'm having is that there are only
so may things you can put in a header/footer, and I don't know how to
reference a formfield from within it. I imagine that I need to write
a macro. I'm a novice at such things but very teachable. Thanks!
-Frank
 
D

Doug Robbins

And cross-references are one of them, and no, you do not need a macro. From
the Insert menu, select Reference and then Cross-Reference and select
Bookmark as the type of reference that you want to insert and select the
bookmark belonging to the formfield and Bookmark text as the thing that you
want to reference to and then click on the Insert button.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
F

Frank Mazzola

Doug,

Thanks so much for your help. I am almost there. I didn't think to
use the main menu bar when I was in the header/footer. One last
problem: The inserted field does not automatically update. I can get
it to update if I right click on it and hit Update Field. The
calculate on exit box IS checked in the formfield that is referenced.

Thanks again,

Frank
 
D

Doug Robbins

You can force it to update by running a macro on exit from the formfield.

The quick and dirty way is to use

With ActiveDocument
.PrintPreview
.ClosePrintPreview
End With


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
F

Frank Mazzola

IT WORKS!!!!

Thank you,

Frank

Doug Robbins said:
You can force it to update by running a macro on exit from the formfield.

The quick and dirty way is to use

With ActiveDocument
.PrintPreview
.ClosePrintPreview
End With


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
F

Frank Mazzola

Doug,

Thanks for you help, but I do have one more question. Everything
works fine except that the formatting of the fields is screwed up.
For example, I set the font at Times New Roman 9 point, but for
example, if "January 9, 1945" is the text put into the footer, the
numbers keep the font size of 12 point as in the formfield that is
referenced. The letters in "January", on the other hand, are changed
to 9 point. Any way to fix this?

-Frank
 
D

Doug Robbins

Use Alt+F9 to toggle on the display of the field codes in the { REF } fields
and inside the closing } at \* Charformat Then select the R of REF and
apply the desired formatting to it.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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