Group:  Microsoft Word » microsoft.public.word.docmanagement
Thread: One of the most annoying things about Word... updating fields

Geek News

One of the most annoying things about Word... updating fields
Angus <anguscomber[ at ]gmail.com> 12/11/2008 2:21:40 PM
Hello

I know I am not alone in finding the way Word does not update field
information frustrating. An example is to create a field based on
advanced document properties. The best way to update the entire
document I have found is to Ctrl A then F9. But this doesn't
completely work because Ctrl A does not select text in headers and
footers.

Does anyone have a solution for this problem. ie how to update the
whole document when you change a field properties.

Angus
Re: One of the most annoying things about Word... updating fields
"Stefan Blom" <no.spam[ at ]please.xyz> 12/11/2008 2:41:10 PM
Note that fields in headers and footers usually update if you switch to
Print Preview and then back to your current view. You can use Ctrl+F2 as a
toggle.

On the other hand, if you want a macro that updates all of the fields in a
document, see http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP



"Angus" <anguscomber[ at ]gmail.com> wrote in message
news:7dbe8517-e51f-480d-b3fa-5f59fa8ede69[ at ]e1g2000pra.googlegroups.com...
[Quoted Text]
> Hello
>
> I know I am not alone in finding the way Word does not update field
> information frustrating. An example is to create a field based on
> advanced document properties. The best way to update the entire
> document I have found is to Ctrl A then F9. But this doesn't
> completely work because Ctrl A does not select text in headers and
> footers.
>
> Does anyone have a solution for this problem. ie how to update the
> whole document when you change a field properties.
>
> Angus


Re: One of the most annoying things about Word... updating fields
p0 <yves.dhondt[ at ]gmail.com> 12/11/2008 2:48:13 PM
On Dec 11, 3:21 pm, Angus <anguscom...[ at ]gmail.com> wrote:
[Quoted Text]
> Hello
>
> I know I am not alone in finding the way Word does not update field
> information frustrating.  An example is to create a field based on
> advanced document properties.  The best way to update the entire
> document I have found is to Ctrl A then F9.  But this doesn't
> completely work because Ctrl A does not select text in headers and
> footers.
>
> Does anyone have a solution for this problem.  ie how to update the
> whole document when you change a field properties.
>
> Angus

The following macro should do the trick.

Yves

=====================================
Sub UpdateAllFields()
Dim story As Range

Application.ScreenUpdating = False

For Each story In ActiveDocument.StoryRanges
story.Fields.Update
Next

Application.ScreenUpdating = True

End Sub
=====================================

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net