Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
divya divya is offline
external usenet poster
 
Posts: 15
Default Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values

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

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values

REF fields in headers don't automatically update. You have to force an
update. You could add the update macro at
http://www.gmayor.com/installing_macro.htm to your toolbar to make things
easy, or investigate whether Styleref fields will do what you want - as they
do update.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


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



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
divya divya is offline
external usenet poster
 
Posts: 15
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem arises when ref bookmark is added in the header ,it does not take the modified values and displays the same old values divya Microsoft Word Help 0 July 6th 06 11:47 AM


All times are GMT +1. The time now is 10:33 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"