Condividi tramite


Securing Office Documents and Visual Basic for Applications Code

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Security can mean many things depending on your perspective. If your solution contains or provides access to sensitive information, such as legal documents or payroll records, you will need to control access to this information. In this chapter, this is referred to as providing access security for your solution.

If you are retaining the ownership of the Visual Basic for Applications (VBA) code you develop, an additional aspect of access security is protecting the intellectual property value of your code. In this case, you need to prevent unauthorized access to your solution's code.

Developers, administrators, and users are all concerned with the reliability of a Microsoft Office solution. Part of ensuring the reliability of your solution is making sure that users can't alter its code or design in any way that will keep it from working. In this chapter, this is referred to as providing integrity security for your solution. This chapter discusses how to preserve the integrity of code in your solution by restricting access to the code.

With the advent of macro viruses, you also need to assure users and administrators that they can trust macros (VBA code) contained in any Office documents that are part of your solution. Microsoft Word, Microsoft Excel, Microsoft PowerPoint, and Microsoft Outlook now allow anti-virus software to scan documents as they are being opened. Additionally, Word, Excel, PowerPoint, and Outlook incorporate Microsoft Authenticode technology, which allows developers to digitally sign the VBA projects in their solutions and allows users to set security settings to automatically enable only macros from trusted sources.

This chapter discusses how to address these access security and virus security issues for Word, Excel, PowerPoint, and Outlook. It also discusses how to secure VBA code, which applies to Microsoft FrontPage and Microsoft Access as well. For more information about addressing security issues in Access, see Chapter 18, "Securing Access Databases."

Contents

Providing Access Security for Office Documents

Protecting Office Documents from Macro Viruses

Where to Go from Here