Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values
I got the problem solved by adding a macro which updates all the
references of the bookmarks . Sub myUpdateFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub Add this in the onexit event of the text fields I got this from http://gregmaxey.mvps.org/Field_Macros.htm This link is really good for repeating the form text in whichever part of document u need. http://gregmaxey.mvps.org/Repeating_Data.htm divya wrote: Problem arises when ref is added in the header ,it does not take the modified values of the bookmarks and displays the same old values. The problem with ref what am facing is: 1.First time I enter the data in form it takes these values and on the header where I have added REF Bookmark copies these values as needed. 2.But when I overite or make changes to previously enterd data it doesn't modify the header and shows me in the header the prev old values. 3.Now I save & close this document . 4.When I Reopen and fill the form,now the header shows me the same old values the ones b4 closing. Header is only taking the values when the REF was first executed. Kindly suggest a solution.Do I need to add any macro which forces the execution of the REF in the header when any of the data in the Book marks is changed??Plz help me with the code.Can this be done using REF,I mean capturing values from the form and repeating them in the header??? regards, Divya Plz help me out ,I need to finishi the assingnemnt today. Cheerz Divya - Hide quoted text - - Show quoted |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values | Microsoft Word Help |