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 / Long Documents / December 2005

Tip: Looking for answers? Try searching our database.

Auto update field issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ana - 09 Dec 2005 23:13 GMT
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!
Charles Kenyon - 09 Dec 2005 23:20 GMT
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,
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.

>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
[quoted text clipped - 11 lines]
>
> Thanks!
Jezebel - 09 Dec 2005 23:23 GMT
I don't know of an automatic way to do this, but the following code will do
it --

Sub Macro1()

Dim pRange        as Word.Range

For each pRange in ActiveDocument.Storyranges
   Do
       pRange.Fields.Unlink
       set pRange = pRange.NextStoryrange
   Loop until pRange is nothing
Next

Msgbox "Finished"

End Sub

>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
[quoted text clipped - 11 lines]
>
> Thanks!
Daiya Mitchell - 10 Dec 2005 02:34 GMT
If the document is collated via IncludeText fields, there is a switch to say
not to update fields within them.  Not sure if the same switch works for
other types of fields--check in Help.

See #4 "Fields within Fields" here:
http://word.mvps.org/FAQs/TblsFldsFms/includetextfields.htm

> 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
[quoted text clipped - 11 lines]
>
> Thanks!

Signature

Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: <http://www.word.mvps.org/MacWordNew/>
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

Ana - 12 Dec 2005 11:00 GMT
Thank you all so very much for your help!! The code really works, but
unfortunately Word updates fields before the code unlinks them. But you
gave me a great start because I have almost no experience with VBA. So,
I'm now playing with the code, and I'm sure I'll find solution to my
problem.

Thanks again!!!!
Charles Kenyon - 12 Dec 2005 16:39 GMT
For the includetext fields, take another look at the switch referred to
earlier.
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.

> Thank you all so very much for your help!! The code really works, but
> unfortunately Word updates fields before the code unlinks them. But you
[quoted text clipped - 3 lines]
>
> Thanks again!!!!
 
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.