Results 1 to 2 of 2
2006-12-01, 20:43 #1
- Join Date
- Nov 2002
- Thanked 0 Times in 0 Posts
Program control of encrypting a file (Excel 2000, XP, 2003, and Offcie 12)
When you save an Excel file using "Save As" you have the option to secure it at this point. When the "Save As" dialog appears you will see in the upper right corner a "Tools" item. Select it and then select "General Options" which will bring up a dialog askign for an "Open" password and an "Edit" password. There is an "Advance" button next to the open password edit box, select it. This brings up the Encryption dialog that allows te user to encrypt the file.
My question is is there an API that allows one to write code to do this rather the user doing it manually?
2006-12-01, 20:48 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Program control of encrypting a file (Excel 2000, XP, 2003, and Offcie
I can only check in Excel 2002 (XP). The Workbook object has a SetPasswordEncryptionOptions method with arguments PasswordEncryptionProvider, PasswordEncryptionAlgorithm, PasswordEncryptionKeyLength, and PasswordEncryptionFileProperties. Here is the example from the Excel VBA help:
PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _