Use a macro digital signature to prevent security warnings from appearing.

Source: Internet
Author: User

Many experts like to use the "macro" command to improve office work efficiency. However, when using macros in Microsoft Office programs, the macro security warning is always displayed, especially when creating a resume table, macros are often used, which makes users feel a lot of trouble each time they open them. If we set the macro security level to "low", we can avoid security warnings and increase the risk of malicious code and virus attacks. What should we do? In fact, you only need to add a signature to your Macro. The following uses Microsoft Excel as an example to describe how to set it.

Step 1: Set the macro security level to "low"

Open Excel, select Tools> macro> Visual Basic Editor, Select Insert> module in Visual Basic Editor, and enter three lines of code in the window: sub macrodm (), MsBox "my macro", and End Sub (no punctuation marks after the Code ). Select "File> close and return to Microsoft Excel", and save and close the current Excel file. Then open the file, and a security warning is displayed, prompting that the macro is disabled. In this case, select Tools> macros> Security. In the displayed dialog box, set the "macro" security level to "low" and click "OK" to save the settings.

Step 2: Install the digital certificate of the VBA Project

Open Control Panel → add or delete programs → change or delete programs ", locate Microsoft Office Professional Edition 2003 on the right, and click Change ", then, "Install Microsoft Office 2003" appears. Select "add or delete function> next", select the "select Advanced Custom Application" check box, and click "Next ", in Office sharing, click the arrow on the left of "Digital Certificate of VBA Project", click "run from local computer" in the list, and then click "Update ", insert an office installation disk to start installation.

Step 3: Create your own digital certificate

After the installation is successful. Select "Microsoft Office tools → digital certificates for VBA Project" in the Microsoft Office boot program menu. In the "Create Digital Certificate" dialog box that appears, in the "Your Certificate Name" box, enter the name of the digital certificate and click "OK" to create your digital certificate.

Step 4: Add a signature to the macro

Open the file created in step 2, select "Tools> macro> Visual Basic Editor", select "Tools> digital signature" in the editor, and in the "Digital Signature" dialog box, click the select button, select the digital certificate created in Step 4, and click OK to return. Select "File> close and return to Microsoft Excel", and save and close the file.

Step 5: Add yourself as a reliable publisher

Open the file that contains the signed macro in step 5. If a warning is displayed, select the check box "always trust macros from this publisher" and click "enable macros ". Open the Excel file again and no security warning is displayed. You can also execute the macro you created by using the macro in the tool menu. Through the above introduction, such a window prompt will no longer pop up when there is a macro operation.

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.