This example unprotects the active document, using "Blue" as the password. If the document has a password, a dialog box prompts the user for the password.
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:="Blue"
End If
This example unprotects the active document. Text is inserted, and the document is protected for revisions.
Set aDoc = ActiveDocument
If aDoc.ProtectionType <> wdNoProtection Then
aDoc.Unprotect
Selection.InsertBefore "department six"
aDoc.Protect Type:=wdAllowOnlyRevisions, Password:="Blue"
End If