B
BobZ
I'm trying to protect my Word doc by making sure all hiddend text is hidden
and keeping the protected doc locked by not allowing the user to use the
Protect Form (ProtectForm) button. I've done it for the ShowHide button, but
don't know VBA syntax enough to do it for protect. This is what I've done so
far with the help of others:
Private Sub Document_Open()
'Hides all hidden text when the form is first opened.
ActiveWindow.View.ShowAll = False
ActiveWindow.View.ShowHiddenText = False
'Protects the form if it's been unprotected.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.protect wdAllowOnlyFormFields, noreset:=True
End If
End Sub
Sub ShowAll()
'Intercepts ShowAll command to prevent display of hidden text
ActiveWindow.ActivePane.View.ShowAll = False
End Sub
I've tried using the VBE but just don't know enough. Can someone help?
Thanks!
and keeping the protected doc locked by not allowing the user to use the
Protect Form (ProtectForm) button. I've done it for the ShowHide button, but
don't know VBA syntax enough to do it for protect. This is what I've done so
far with the help of others:
Private Sub Document_Open()
'Hides all hidden text when the form is first opened.
ActiveWindow.View.ShowAll = False
ActiveWindow.View.ShowHiddenText = False
'Protects the form if it's been unprotected.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.protect wdAllowOnlyFormFields, noreset:=True
End If
End Sub
Sub ShowAll()
'Intercepts ShowAll command to prevent display of hidden text
ActiveWindow.ActivePane.View.ShowAll = False
End Sub
I've tried using the VBE but just don't know enough. Can someone help?
Thanks!