S
Starbird
I have a template that will have different types of users. I am trying to
set the protection to read only if the user selects one option in the
userform and to formfieldsonly if the user selects a different option. The
code I'm using is:
If Me.opEng.Value = True Then
ActiveWindow.ActivePane.View.ShowAll = True
ActiveDocument.Protect Password:="test", NoReset:=True,
Type:=wdAllowOnlyFormFields
ElseIf Me.opOperator.Value = True Then
ActiveWindow.ActivePane.View.ShowAll = False
ActiveDocument.Protect Password:="test", NoReset:=True,
Type:=wdAllowOnlyReading
End If
I must be leaving something out, I have tried several things but to no avail.
Thanks for any assistance!
SRD
set the protection to read only if the user selects one option in the
userform and to formfieldsonly if the user selects a different option. The
code I'm using is:
If Me.opEng.Value = True Then
ActiveWindow.ActivePane.View.ShowAll = True
ActiveDocument.Protect Password:="test", NoReset:=True,
Type:=wdAllowOnlyFormFields
ElseIf Me.opOperator.Value = True Then
ActiveWindow.ActivePane.View.ShowAll = False
ActiveDocument.Protect Password:="test", NoReset:=True,
Type:=wdAllowOnlyReading
End If
I must be leaving something out, I have tried several things but to no avail.
Thanks for any assistance!
SRD