A way to automatically encrypt Word documents uniformly

Source: Internet
Author: User

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.

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.