Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Dec 2000
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protect form fields in Word using code

    I need to protect form fields in Word using code.

    I tried setting Word VBA's ProtectedForForms property to true. That did absolutely nothing. My form fields still weren't protected. When I then tried recording a macro with the "Protect Form" command from Word's Form toolbar, no code got generated. Absolutely beautiful.

    Does anyone have the workaround to this one?

    Thanks.

    Stephan

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protect form fields in Word using code

    Try:

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

    Protecting a form turns the macro recording off, that's why you don't see the command executed
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Posting Permissions

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