Word document encryption, how to let Word automatically encrypt

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.