F
fredrique
Hi
i have been working on a word document, where i have added a field {REF
Name} (this field refer to a bookmark in the document) into Text Box. and i
have placed the Text Box in the headerAndFooter of the document. the issue
is to get the updated field in the whole document.
i have wrote a macro that does the update, everything works fine.
the problem start when i lock(protect) the document, and i run the macro an
error happens.
the following is the code that i used
1) ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
2) Selection.HeaderFooter.Shapes("Text Box 05").Select
3) Selection.WholeStory
4) Selection.Fields.Update
5) ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
the first line checks
the 2end select the Text Box
the 3rd select the text
the 4th update
the 5th return to the mainDocument
i would realy love to get help, it means so much to me.
i'm using 2004 word,
thank you for your help
i have been working on a word document, where i have added a field {REF
Name} (this field refer to a bookmark in the document) into Text Box. and i
have placed the Text Box in the headerAndFooter of the document. the issue
is to get the updated field in the whole document.
i have wrote a macro that does the update, everything works fine.
the problem start when i lock(protect) the document, and i run the macro an
error happens.
the following is the code that i used
1) ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
2) Selection.HeaderFooter.Shapes("Text Box 05").Select
3) Selection.WholeStory
4) Selection.Fields.Update
5) ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
the first line checks
the 2end select the Text Box
the 3rd select the text
the 4th update
the 5th return to the mainDocument
i would realy love to get help, it means so much to me.
i'm using 2004 word,
thank you for your help