Use edraw to open encrypted Word and Excel files

Source: Internet
Author: User
Tags password protection

Address: http://www.evget.com/zh-CN/Info/catalog/18013.html

Microsoft Word and Excel can help you protect the security of your documents. Therefore, many documents provide the password and writepassword attributes. Edraw office viewer component
The component allows developers to open a password protection document without a message box. This component supports seamless integration with Office 97, Office 2000, Office 2003, Office 2007, and office 2010.

Password protection dialog box

Writepassword protection dialog box

To delete the two protection dialog boxes, follow these steps:

Before calling the open method, you can use the setvalue method to set the password and writepassword attributes for the Word and Excel files. It is best to add the setvalue method to the beforeappsentopened event or the policyctrlready event.

Boolean setvalue ([in] BSTR name, [in] BSTR value)

Set the password of the document, writepassword, domain, and protectmodereminder.

Name: The name string.
Value: The value string.

For example:

The following VBScript shows how to open a password-protected document. The password of the 1.docx file is 1234, And the writepassword is 5678. You can use the following example:

Sub setvalue_example () edoffice. setvalue "password", "1234" edoffice. setvalue "writepassword", "5678" edoffice. Open "C: \ 1.xls" end sub

 

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.