Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Michigan, USA
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to protect form (Word 97)

    Once again I'm in over my head. With some help, I've written a macro to automatically increment a form number in a Word 97 template. The numbering works fine. What isn't working is the protection. I protected the template using the Tools - Protect Document option. When I open the template, it is protected. When I open a document based on the template, the document is not protected. Since this is a form, I need the protection activated so the users can only enter information into the form fields.

    Can anyone tell me the coding that I'd use withing my macro to protect the document (no password) and if the protection should go before or after the incremental numbering code in the macro?

  2. #2
    Star Lounger
    Join Date
    Mar 2001
    Location
    Michigan, USA
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to protect form (Word 97)

    Just to let you know, I figured out the macro code needed to protect my form without my autonumbering being wiped out.

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    St Georges du Bois, Pays de la Loire
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to protect form (Word 97)

    This switches the protection off:

    ActiveDocument.Unprotect

    This switxches it on:

    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

    David

Posting Permissions

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