Update a Header Field in a Protected Document 
Author Message
 Update a Header Field in a Protected Document

I have a {REF Text1} field in the header of a protected
document.  The bookmark Text1 is a form field in the
protected form.

After entering the Text1 text I can't update the header
field with CTRL+a F9.  I can get the field to update by
printing, or by just toggling print preview.  I even
recorded a macro for toggling print preview on and off and
have it set to run on exit of the Text1 form field.

I tried all kinds of ways to write a more logical macro to
select and update the header field but I admit I don't
understand VBA.

Thanks. Greg



Tue, 02 Aug 2005 06:22:55 GMT  
 Update a Header Field in a Protected Document
Please disregard my previous mindless post.  I had the
answer in my own favorites files KB Article 212356
provides the following macro which works perfectly:

Sub UpdateAllFields()
   Dim aStory As Range
   Dim aField As Field
   For Each aStory In ActiveDocument.StoryRanges
      For Each aField In aStory.Fields
         aField.Update
      Next aField
   Next aStory
End Sub

Quote:
>-----Original Message-----
>I have a {REF Text1} field in the header of a protected
>document.  The bookmark Text1 is a form field in the
>protected form.

>After entering the Text1 text I can't update the header
>field with CTRL+a F9.  I can get the field to update by
>printing, or by just toggling print preview.  I even
>recorded a macro for toggling print preview on and off
and
>have it set to run on exit of the Text1 form field.

>I tried all kinds of ways to write a more logical macro
to
>select and update the header field but I admit I don't
>understand VBA.

>Thanks. Greg
>.



Tue, 02 Aug 2005 06:32:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Automatic Fields in Protected Header ?

2. Updating a TOC in a Protected Document

3. updating a checkbox in a protected document

4. Updated Document Properties in protected template

5. Updating a docproperty in the header(s) of a document

6. "Ask" field and protecting a document

7. URGENT: Error when assigning long strings to Form Fields in a protected Word document

8. Protected document does not allow to insert text in fields

9. Need help w/Protected document with form text fields and check boxes

10. Repost: Stop up\down cursor keys moving between (text) form fields in a protected document

11. Formatting REF fields in Protected Document

12. UserForms for fields on protected documents

 

 
Powered by phpBB® Forum Software