Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / November 2005

Tip: Looking for answers? Try searching our database.

Fields in Text Boxes Don't Update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Miller - 27 Nov 2005 10:06 GMT
I have a Word 2003 document containing references to bookmarks.  When I select all, then hit F9, the references within text boxes don't update, but the rest do.  The only way I can update the references in the text boxes is to select the reference and either right-click and select "update field" or hit F9.  Why does this happen, and is there a way to achieve document-wide update of all fields?  Thanks.

- John
Jezebel - 27 Nov 2005 11:10 GMT
Word handles field updating independently for each storyrange in the
document. The body of the document is one storyrange; the others are
textboxes, headers and footers, footnotes, endnotes, comments, and
textframes. F9 does only the document body. Updating fields wherever they
may be is a perennial VBA issue. If you don't want to write a macro to do
it, the next quickest method seems to be to print preview the document.

I have a Word 2003 document containing references to bookmarks.  When I
select all, then hit F9, the references within text boxes don't update, but
the rest do.  The only way I can update the references in the text boxes is
to select the reference and either right-click and select "update field" or
hit F9.  Why does this happen, and is there a way to achieve document-wide
update of all fields?  Thanks.

- John
Cindy M  -WordMVP- - 27 Nov 2005 14:12 GMT
Hi John,

> I have a Word 2003 document containing references to bookmarks.  When I select all, then hit F9, the references within text boxes don't update, but the rest do.  The only way I can update the references in the text boxes is to select the reference and either right-click and select "update field" or hit F9.  Why does this happen, and is there a way to achieve document-wide update of all fields?

You might try converting the Textboxes to FRAMEs. Those will update properly (along with the body of th edocument). You'll find the command in the Format/Textbox/Textbox dialog.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
John Miller - 27 Nov 2005 17:43 GMT
Thanks to Jezebel & Cindy for your responses.  Frames won't cut it, since my text boxes are on top of other graphics.  Guess I'll take my first shot at creating a macro.

- John
Charles Kenyon - 27 Nov 2005 23:20 GMT
The following may help:
Private Sub FieldsUpdateAllStory()
'   All Story Field Updater
'   Written by Charles Kyle Kenyon 9 December 2004
'   repaired with help from Jezebel 10 December 2004
'   Note, if used in protected form this will reset
'       formfields to their defaults
   Dim oStory As Range
   On Error Resume Next
   For Each oStory In ActiveDocument.StoryRanges
       Do
           oStory.Fields.Update
           Set oStory = oStory.Next
       Loop Until oStory Is Nothing
   Next
End Sub

This can be modified to only update a particular type of field as in:

Private Sub RefFieldUpdateAllStory()
'   Written by Charles Kyle Kenyon 15 November 2001
'   repaired by Jezebel
'   All Story Field Updater - Ref fields
   Dim oField As Field
   Dim oStory As Range
'    On Error Resume Next
   For Each oStory In ActiveDocument.StoryRanges
   ' This goes into headers and footers as well as the regular document
       Do
           For Each oField In oStory.Fields
               If oField.Type = wdFieldRef Then
                   oField.Update
               End If
           Next oField
           Set oStory = oStory.Next
       Loop Until oStory Is Nothing
   Next oStory
End Sub

Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Thanks to Jezebel & Cindy for your responses.  Frames won't cut it, since my
text boxes are on top of other graphics.  Guess I'll take my first shot at
creating a macro.

- John
Jezebel - 28 Nov 2005 08:58 GMT
Charles, this line

>            Set oStory = oStory.Next

should be

>            Set oStory = oStory.NextStoryRange

> The following may help:
> Private Sub FieldsUpdateAllStory()
[quoted text clipped - 40 lines]
>
> - John
Charles Kenyon - 28 Nov 2005 14:34 GMT
Thank you. I've updated my procedures.
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Charles, this line
>
[quoted text clipped - 48 lines]
>>
>> - John
John Miller - 29 Nov 2005 11:45 GMT
Charles & Jezebel -

Thanks!  Given that I've never implemented anything in Visual Basic, this
ought to be an instructive exercise.

I believe it was Socrates who said, "I know I am intelligent, because I know
that I know nothing."  If that be true, I think I'm about to find out that
I'm REALLY intelligent...

- John

> The following may help:
> Private Sub FieldsUpdateAllStory()
[quoted text clipped - 40 lines]
>
> - John
Charles Kenyon - 29 Nov 2005 15:26 GMT
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

http://word.mvps.org/FAQs/MacrosVBA.htm
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Charles & Jezebel -
>
[quoted text clipped - 51 lines]
>>
>> - John

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.