I am at my wits end over here...need some help.
I have a large Word module that I am re-writing. Now on certain documents the MACROS are protected. Now the ActiveDocument itself is not protected. The following code produces no results because it is not protected:
ActiveDocument.unprotect Password:=pwWord
What I need is a way to unprotect the macros via code. I know the password, but every attempt I make to pass a password fails. Such as:
ActiveDocument.VBProject.VBComponents.unprotect Password:=pwWord
ActiveDocument.VBProject.unprotect Password:=pwWord.
both of these throw compiler errors.
How can I simply pass the Macro's password...any ideas. I am stumped.
I have a large Word module that I am re-writing. Now on certain documents the MACROS are protected. Now the ActiveDocument itself is not protected. The following code produces no results because it is not protected:
ActiveDocument.unprotect Password:=pwWord
What I need is a way to unprotect the macros via code. I know the password, but every attempt I make to pass a password fails. Such as:
ActiveDocument.VBProject.VBComponents.unprotect Password:=pwWord
ActiveDocument.VBProject.unprotect Password:=pwWord.
both of these throw compiler errors.
How can I simply pass the Macro's password...any ideas. I am stumped.