Is there a way, in VBA, to uncheck the Attributes for an excel  file

Fordraiders
Fordraiders used Ask the Experts™
on
windows 7

vba  2010
Access or excel

Is there a way, in VBA, to uncheck the Attributes for an excel  file  ?
specifically   "encrypt contents to secure data"
through code ?

Thanks
fordraiders
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2014
Commented:
Within Excel, with the specific document open

ActiveDocument.Unprotect Password:="pwd"
http://www.vbaexpress.com/forum/showthread.php?24011-Solved-Unprotect-a-document-with-a-macro

Within Access, well you'd have to automate Excel, open the file, and send that command to the Workbook object corresponding to the file you just opened.

Author

Commented:
thnx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial