Re: Protect Document Clear Form

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ryan Carlson (RyanCarlson_at_discussions.microsoft.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 10:02:02 -0700

Thanks for the reply Chad. I just finished doing further lurking and came upon this exact code in another post (may have been you even). Created the macro and added to a new custom code toolbar for handy access. Thought I'd check anyway to see if someone had replied and low and behold you had. Thanks for the code anyway. Not sure why Microsoft didn't include an option for protecting without form reset. Just makes sense to me.

"Chad DeMeyer" wrote:

> Unfortunately, Word did not provide a way to do this through the user
> interface. However, there is a back door method using VBA. The following
> line of code in a macro will do what you seek.
>
> ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True[,
> Password:="your password"]
>
> Note the part in brackets is optional, depending on whether or not you
> password protect your form.
> Hope that helps.
>
> Regards,
> Chad
>
>
> "Ryan Carlson" <Ryan Carlson@discussions.microsoft.com> wrote in message
> news:D493B7AC-17BE-426B-A24B-E75C47FDF7CC@microsoft.com...
> > Is there any way to protect document without it clearing the form also. I
> have a form which people will fill out but many sections may be reusable so
> the form is filled out partially to begin with. If I unprotect to make a
> minor edit then reprotect all of the form entries are cleared and I have to
> fill them back in. Just because I unprotect/reprotect doesn't mean I want
> the form cleared every time. Is there a toggle somewhere to choose whether
> or not the clear form upon document protection?
> >
> > Thank you form any guidance you may provide.
>
>
>