M
MM
hello all,
I am trying to create a button by recording a macro to protect my
document by limiting formatting option. Here is the code when the
macro is recorded. But when I try to run the macro I get errors, here
is the code. Can someone tell me how to fix this? thank you.
Sub ProtectFormatting()
ActiveDocument.protect Password:="anything", NoReset:=False,
Type:=7, _
UseIRM:=False, EnforceStyleLock:=True
End Sub
The error is: "Parameter value is out of acceptable range"
I am trying to create a button by recording a macro to protect my
document by limiting formatting option. Here is the code when the
macro is recorded. But when I try to run the macro I get errors, here
is the code. Can someone tell me how to fix this? thank you.
Sub ProtectFormatting()
ActiveDocument.protect Password:="anything", NoReset:=False,
Type:=7, _
UseIRM:=False, EnforceStyleLock:=True
End Sub
The error is: "Parameter value is out of acceptable range"