Hello Daniel,
From your post, my understanding on this issue is: you want to know how to
protect the Office solution's VBA code securely. If I'm off base, please
feel free to let me know.
According to the MSDN article:
http://msdn2.microsoft.com/en-us/library/aa189867(office.10).aspx, there
are four ways to control access to the VBA code:
1. Set a password that is required before the VBA code can be viewed.
(
http://support.microsoft.com/kb/159748). You mentioned that this method is
not secure enough because some 3rd party tools may crack the password.
Based on my research, these tools seem to use "brute force" methods and
rely on dictionaries of common passwords. Because we are *locking* VBA, not
protecting the document content, and because VBA does not expose the
VBProject passwords in its object model, the usual approach to crack the
password is to use SendKeys to simulate the keystrokes that would be used
to enter the password for the project. Therefore, you can improve the
security of your file by using a long string of secure password:
http://www.microsoft.com/smallbusiness/support/articles/select_sec_passwords
..mspx
2. Though a secure password can improve the security of the vba codes, the
password can still be cracked some day in theory. To provide the highest
level of security for your VBA code, use Microsoft Visual Basic to create a
Component Object Model (COM) add-in. Because the VBA code in a COM add-in
is compiled as a dynamic-link library (DLL), it can't be modified without
access to the source code used to originally create it.
Application-specific add-ins are not compiled; you must use the same
protections as templates and documents. For information about how to create
COM add-ins, see
http://msdn2.microsoft.com/en-us/library/aa189019(office.10).aspx
3. In Access, you can save an .mdb or .adp file as a file type that
contains only compiled VBA code without the source code. For .mdb files,
this file type is called an .mde file; for .adp files, this file type is
called an .ade file. VBA code in these file types still runs, but there is
no way to view or modify the code.
http://msdn2.microsoft.com/en-us/library/aa141451(office.10).aspx
4. You can use file-system access-control features to control what users
can do with documents and templates. See:
http://msdn2.microsoft.com/en-us/library/aa190075(office.10).aspx
Please let me know if you have any other concerns, or need anything else.
Sincerely,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.