PRB: Macro Warning Occurs in an Office Application When You Load a .NET Add-In (316724)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Access 2002
- Microsoft Excel 2002
- Microsoft Word 2002
- Microsoft PowerPoint 2002
This article was previously published under Q316724 SYMPTOMS When a Microsoft Office application loads a Component
Object Model (COM) add-in or a smart tag recognizer add-in that is created with
Visual Studio .NET, you may experience one of the following problems:
The problem applies to all Office applications but may not
occur, depending on other options that the user selects for a particular
application, or if the Macro Security setting is set to
Low. CAUSE Microsoft Office security is designed to use digital
signatures to verify the integrity of the components that it loads. When the
Macro Security setting of an application is set to
High, only digitally signed components are loaded. When the
Macro Security setting is set to Medium, you
are prompted to select whether to load unsigned add-in components.
Managed languages in the Microsoft .NET Framework (such as Microsoft Visual
Basic .NET and Microsoft Visual C# .NET) are loaded and are run by using the
common language runtime. When your custom component is registered for COM
Interop, the COM InprocServer32 key points to the common language runtime (Mscoree.dll), not your
custom assembly. Because Office checks the signature of the component that is
listed under the InprocServer32 key, and because Mscoree.dll is not digitally signed, you may
experience the problems that are listed in the "Symptoms" section of this
article.
If the add-in is installed locally, and if you click to
select the Trust all installed add-ins and templates check box
in the Macro Security dialog box, you may not experience these
problems. However, this option is not available in all Office applications and
must not be considered a workaround for all users. STATUSThis
behavior is by design. However, Microsoft is investigating
options to safely identify the common language runtime and to check the digital
signature of the custom assembly in future versions of Office. REFERENCESFor additional information about building Office solutions by
using Visual Studio .NET, click the article number below to view the article in
the Microsoft Knowledge Base: 311452 INFO: Developing Microsoft Office Solutions with Visual Studio .NET
Modification Type: | Major | Last Reviewed: | 12/15/2003 |
---|
Keywords: | kbprb KB316724 kbAudDeveloper |
---|
|