The
Word provide the encryption feature, but cannot automatically encrypt documents. Here's a way to automatically add a password to a Word document (for example, in Word 2003).
First step: On the Tools menu, select the Macros tab, click Macros, type the name "Allautopassword" for the macro, and in the Macros in box, select all active templates and documents, and in the description You can type a description of the macro, such as "Use macros to unify the document," and finally click the Create button.
Step two: The Macros edit window pops up in sub Allautopassword () Enter the following code between the and End Sub:
//password 123456
with Options
. AllowFastSave = True
. BackgroundSave = True
. CreateBackup = False
. SavePropertiesPrompt = False
. SaveInterval =
. SaveNormalPrompt = False
End with
With ActiveDocument
. readonlyrecommended = False
. EmbedTrueTypeFonts = False
. SaveFormsData = False
. savesubsetfonts = False
. Password = "123456" ' Open permission password
. WritePassword = "123456" ' Modify permission password
End with
Application. DefaultSaveFormat = ""
Step three: After code entry, select Save Normal on the File menu, click Close and return to Microsoft Word, and then on the Tools menu, choose Customize, select command Label, select Macros in categories, find Normal.NewMacros.AllAutoPassword in command, and then move it to a common toolbar.
, when a user creates or closes a document, the macro will remind the user whether to save changes to the document, and if "Yes" is selected, the document will be automatically added with the password "123456" without the password.