![]() ![]() Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. If aDoc.ProtectionType wdNoProtection ThenĪDoc.Protect Type:=wdAllowOnlyRevisions, Password:=strPassword Text is inserted, and the document is protected for revisions. This example removes protection from the active document. If ActiveDocument.ProtectionType wdNoProtection ThenĪctiveDocument.Unprotect Password:=strPassword This example removes protection from the active document, using the value of the strPassword variable as the password. If the document isn't protected, this method generates an error. For recommended best practices on how to do this, see Security notes for Office solution developers. If a password is required in a procedure, request the password from the user, store it in a variable, and then use the variable in your code. ![]() Avoid using hard-coded passwords in your applications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |