Word provides cryptographic functionality, but it does not automatically encrypt documents. Here's a way to automatically combine passwords with Word documents (for example, in Word 2003).
The first step: on the Tools menu, select the Macros tab, click Macros, type the name of the macro "Allautopassword", select "All active templates and documents" in the Macros in box, and in the description, type a description of the macro, such as "exploit" Macro to encrypt the document, and then click the Create button.
Step Two: the system pops up the Macros edit window and enters the following code between sub Allautopassword () and End Sub:
Password is 123456
With Options
. AllowFastSave = True
. BackgroundSave = True
. CreateBackup = False
. SavePropertiesPrompt = False
. SaveInterval = 15
. 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 the code is entered, select Save Normal from the File menu, click Close and return to Microsoft Word, and then on the Tools menu, choose Customize, select the Commands tab, select Macros in categories, and find in the commands. "Normal.NewMacros.AllAutoPassword" and move it to a common toolbar.
Later, when a user creates a new or closed document, the macro will remind the user whether to save the changes to the document, and if you choose Yes, the document will be automatically added with the password "123456" and not the password.