I have a need to prevent changes from being made to an ActiveDocument.
The limitation is I'm trying to "band-aid" a 3rd party application. It
breaks if the ActiveDocument is protected. I know that I can capture
the user moving the mouse (i.e making a selection) via
WindowSelectionChange event. How can I then prevent the user from
making any changes or additions (pseudo-protect)? Is there a built-in
macro(s) that I could override?

Re: How to perform a "pseudo" ActiveDocument.protect by Dawn

Dawn
Thu Sep 29 11:46:11 CDT 2005

When you load the ActiveDocument, you can protect it by adding
the following code to the startup of your document.

Sub proToggleFormLock()

'Toggle the Protection on and off

If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then

ActiveDocument.Unprotect Password:="myPassword"

Else

ActiveDocument.Protect Password:="myPassword", NoReset:=True,
Type:= _

wdAllowOnlyFormFields

End If

End Sub



I am not aware of any built-in macro's which would help you with
what you want to do other than to increase the security level to
High or Very High depending on the version of Word you are
running.


--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and
questions to the newsgroup so that others can learn as well.

<barnettj68@yahoo.com> wrote in message
news:1127928692.097232.200930@g47g2000cwa.googlegroups.com...
I have a need to prevent changes from being made to an
ActiveDocument.
The limitation is I'm trying to "band-aid" a 3rd party
application. It
breaks if the ActiveDocument is protected. I know that I can
capture
the user moving the mouse (i.e making a selection) via
WindowSelectionChange event. How can I then prevent the user
from
making any changes or additions (pseudo-protect)? Is there a
built-in
macro(s) that I could override?


Re: How to perform a "pseudo" ActiveDocument.protect by barnettj68

barnettj68
Thu Sep 29 13:01:03 CDT 2005

Unfortunately the 3rd party's ActiveX control that integrates with Word
fails when the ActiveDocument is protected via ActiveDocument.Protect.
Thus the need to override the ability to edit, delete, or insert text
when the WindowSelectionChange event fires.

Dawn Crosier wrote:
> When you load the ActiveDocument, you can protect it by adding
> the following code to the startup of your document.
>
> Sub proToggleFormLock()
>
> 'Toggle the Protection on and off
>
> If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
>
> ActiveDocument.Unprotect Password:="myPassword"
>
> Else
>
> ActiveDocument.Protect Password:="myPassword", NoReset:=True,
> Type:= _
>
> wdAllowOnlyFormFields
>
> End If
>
> End Sub
>
>
>
> I am not aware of any built-in macro's which would help you with
> what you want to do other than to increase the security level to
> High or Very High depending on the version of Word you are
> running.
>
>
> --
> Dawn Crosier
> Microsoft MVP
> "Education Lasts a Lifetime"
>
> This message is posted to a newsgroup. Please post replies and
> questions to the newsgroup so that others can learn as well.
>
> <barnettj68@yahoo.com> wrote in message
> news:1127928692.097232.200930@g47g2000cwa.googlegroups.com...
> I have a need to prevent changes from being made to an
> ActiveDocument.
> The limitation is I'm trying to "band-aid" a 3rd party
> application. It
> breaks if the ActiveDocument is protected. I know that I can
> capture
> the user moving the mouse (i.e making a selection) via
> WindowSelectionChange event. How can I then prevent the user
> from
> making any changes or additions (pseudo-protect)? Is there a
> built-in
> macro(s) that I could override?