Unprotect a document through VBA

S

Sue

How can I use this code to unprotect a document, or am I
way off base?

wdDialogToolsUnprotectDocument

Thanks for any help!
 
A

Astrid

Hi Sue,

To unprotect a document use:
Activedocument.Unprotect

to reprotect it (as a form with formfields) without loosing the date, use:
ActiveDocument.Protect type:=wdAllowOnlyFormFields, NoReset:=True

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top