View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Charles Kenyon
 
Posts: n/a
Default Auto update field issue

What follows is a macro that locks merge fields. If you get rid of the test
If oField.Type = wdFieldMergeField Then
oField.Lock
End If

and substitute
oField.Lock

it should work. Haven't tested though.

oStory.Fields.Lock
might lock all fields in the story. I expect it would, but haven't tested.

Sub MergeFieldLockAllStory()
' Written by Charles Kyle Kenyon 1 April 2005
'
' All Story Field Locker - Merge 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 = wdFieldMergeField Then
oField.Lock
End If
Next oField
Set oStory = oStory.NextStoryRange
Loop Until oStory Is Nothing
Next oStory
End Sub

Hope this helps,
--
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.

"Ana" wrote in message
oups.com...
I am working with Word 2003. I have to create a large document by
pulling in various files (each file is from 1-15 pages long). Each file
becomes a section in the document. Each section has a footer that
consists of fields from original files. After the document is created I
have to print it, but I don't want to update fields - I want to keep
the original values. Option Update fields is turned off (Tools,
Options, Print tab), but Word still updates them when I try to print
it. I also tried selecting whole document (CTRL + A), and then pressing
CTRL+SHIFT+F9 to convert fields to regular text, and it worked for text
in the document, but not footers. I can select text in footer of every
section and then change fields into text, but is time consuming. Is
there any way to select ALL text (including footers in all sections) in
one or two steps?

Thanks!