Microsoft Office 2000/Visual Basic Programmer's Guide   

Office Document Virus Protection

Nearly everyone is familiar with the problem of macro viruses, which can range from the merely annoying to the truly destructive. In previous versions of Office, a document that contains VBA code will, depending on application-level settings, display a warning message before opening. It is up to users to choose whether to run the suspect VBA code when they open a document. But developers need to be able to assure users and administrators that they can trust the VBA code in a custom solution.

Microsoft Excel, Microsoft Outlook, Word, and PowerPoint now enable anti-virus software to scan documents as they are being opened to detect the presence of actual viruses, not just regular VBA code. In addition, these Office applications now support Microsoft Authenticode™ technology, which allows developers to digitally "sign" the VBA projects in their solutions by using a digital certificate. Users or network administrators can specify that a certificate is a trusted source, and Office applications then automatically enable the opening of documents containing VBA code from trusted sources. For a complete discussion of the security features in Office applications, including security for Microsoft Access databases and Microsoft FrontPage-based webs, see Chapter 17, "Securing Office Documents and Visual Basic for Applications Code," and Chapter 18, "Securing Access Databases."