How do I update field values inside a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using CTL+A followed by F9 updates all fields except those in a text box.
Currently I have to select each text box manually and then press F9 to
refresh the field.

Is there a better way?
 
Don't put fields in text boxes! Use table cells or convert them to frames.
Text boxes are in the drawing layer of the document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Thank you. Unfortunately we have too many documents with too many text boxes
for your suggestion to be a viable option for us.

On the other hand, I found the following macro which updates all fields
including those in the drawing layer, and I think this may be the solution
for us. Just one issue though, this macro does not offer the "Update entire
table" option for the TOC update like Ctrl+A and F9 does. Any suggestion?

Dim myStoryRange As Range

For Each myStoryRange In ActiveDocument.StoryRanges
myStoryRange.Fields.Update
Do While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Update
Loop
Next myStoryRange
Dim myStoryRange As Range
 
Add the following code to the mix

Dim oTOC As TableOfContents
For Each oTOC In ActiveDocument.TablesOfContents
oTOC.Update
Next oTOC

But you may still be better weaning users off text boxes :(

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top