G
Guest
Is there a reported probelm with the Unprotect vba command? The following
code is from a recorded maco: (ok, it's silly because it locks and unlocks
the document in the same step, but I was experimenting).
ActiveDocument.Protect Password:="password", NoReset:=False, Type:= _
wdAllowOnlyComments, UseIRM:=False, EnforceStyleLock:=False
ActiveDocument.Unprotect
While recording, it produced the input box, requesting the password, as
expected. But when I go into vb editor an "Run" the routine, it produces the
message:
Runtime error '5485' The password is incorrect.
The input box never appeared requesting the password. Debug shows a problem
with "ActiveDocument.Unprotect" This code was written by the recorder!
code is from a recorded maco: (ok, it's silly because it locks and unlocks
the document in the same step, but I was experimenting).
ActiveDocument.Protect Password:="password", NoReset:=False, Type:= _
wdAllowOnlyComments, UseIRM:=False, EnforceStyleLock:=False
ActiveDocument.Unprotect
While recording, it produced the input box, requesting the password, as
expected. But when I go into vb editor an "Run" the routine, it produces the
message:
Runtime error '5485' The password is incorrect.
The input box never appeared requesting the password. Debug shows a problem
with "ActiveDocument.Unprotect" This code was written by the recorder!