Consulting

Results 1 to 3 of 3

Thread: Solved: Word Document Protection

  1. #1
    VBAX Regular
    Joined
    Nov 2004
    Posts
    74
    Location

    Solved: Word Document Protection

    Hello,

    I have a template with a userform. On the userform there are a few option buttons. Once an option button is selected it outputs some text into the footer.

    I have now been asked to protect my document. I have therefore protected the top and bottom of my document using sections and left the middle open for people to type in. When the userform runs I get a compiler error because it's not allowed to output to the protected footer. Is there a way to bypass this so that VBA can write into the footer but not the user?

    Any ideas would be gratefully received, thanks )

  2. #2
    VBAX Regular
    Joined
    Nov 2004
    Posts
    74
    Location
    Thanks Dreamboat

    'In order to unprotect the form in Word 2000, you must use the following code before and after your procedure:

    Before:

    ActiveDocument.Unprotect Password:=""

    After:

    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" '

    The office experts

  3. #3
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Cool beans.
    ~Anne Troy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •