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. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #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
  •