Hi Stephen
Thank you so much for your reply.
Unprotecting the document with Code worked.
I am guessing the text box is in the header of the first section because the code to change it is ActiveDocument.Sections(1).Headers ...
Basically what I have is a one page document with graphics and text boxes in the header and footer. I have the body of the of the document divided into two sections; one for displaying sets of shapes and one for a User Form.
Some of the shapes I have in the first section are in the story area (I think that is what it is called, the header type area behind the section) of the first section and the VBA code changes those shapes and text boxes just fine without unprotecting the document. It was just the text box in the header of the page/document that was being affected by the document protection.
Also I would very much like to protect the header, footer, and story areas of the document so they can not be accessed by the user. Is there any way of doing that?
Thanks and Best Regards
Sun Tea
On Monday, June 25, 2012 9:19:31 AM UTC-5, Stefan Blom wrote:
> Editing is limited in a protected document; this includes any unprotected
> sections. You probably have to unprotect and reprotect the document, which you
> can do in code, before you can add text to the header.
>
> By the way, to which header in which section is the text box anchored?
>
> --
> Stefan Blom
> Microsoft Word MVP
>
>
>
>
>
> "sun tea" wrote in message