Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
John Miller
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Jezebel
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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.



"John Miller" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Cindy M -WordMVP-
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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 :-)

  #4   Report Post  
Posted to microsoft.public.word.pagelayout
John Miller
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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
  #5   Report Post  
Posted to microsoft.public.word.pagelayout
Charles Kenyon
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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

--
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.


"John Miller" wrote in message
...
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




  #6   Report Post  
Posted to microsoft.public.word.pagelayout
Jezebel
 
Posts: n/a
Default Fields in Text Boxes Don't Update

Charles, this line

Set oStory = oStory.Next


should be

Set oStory = oStory.NextStoryRange








"Charles Kenyon" wrote in
message ...
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

--
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.


"John Miller" wrote in message
...
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



  #7   Report Post  
Posted to microsoft.public.word.pagelayout
Charles Kenyon
 
Posts: n/a
Default Fields in Text Boxes Don't Update

Thank you. I've updated my procedures.
--
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.

"Jezebel" wrote in message
...
Charles, this line

Set oStory = oStory.Next


should be

Set oStory = oStory.NextStoryRange








"Charles Kenyon" wrote in
message ...
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

--
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.


"John Miller" wrote in message
...
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





  #8   Report Post  
Posted to microsoft.public.word.pagelayout
John Miller
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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

"Charles Kenyon" wrote in
message ...
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

--
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.


"John Miller" wrote in message
...
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



  #9   Report Post  
Posted to microsoft.public.word.pagelayout
Charles Kenyon
 
Posts: n/a
Default Fields in Text Boxes Don't Update

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

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

http://word.mvps.org/FAQs/MacrosVBA.htm
--
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.

"John Miller" wrote in message
...
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

"Charles Kenyon" wrote in
message ...
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

--
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.


"John Miller" wrote in message
...
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





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Header with picture or text box Scott Page Layout 15 April 28th 23 02:52 AM
MULTIPLE INSTANCES OF THE SAME BOOKMARK IN A USER FORM Carol Microsoft Word Help 20 October 3rd 06 12:41 AM
Word 2000 linked text boxes Ed Microsoft Word Help 0 September 20th 05 09:20 PM
How do I *automatically* update fields before I print? Amasita Microsoft Word Help 0 August 31st 05 03:59 PM
Automatically Update Form Text Fields Brendan Vassallo Microsoft Word Help 3 May 4th 05 05:35 AM


All times are GMT +1. The time now is 12:47 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"