« Notable Links | Main | Notable Links »

Visual Studio Tools for Office

Posted by: David Carroll

The basic architecture is simple. Excel 2003 and Word 2003, upon loading a document, check for two custom properties in the document: _AssemblyLocation0 and _AssemblyName0. If these properties are found, the host application loads the Visual Studio Tools for the Microsoft Office System Assembly Loader (Otkloadr.dll). This unmanaged DLL is responsible for loading the assembly that you created using Visual Studio Tools for the Microsoft Office System. The loader uses the document's custom properties to find the document's assembly, loads the assembly into memory, examines some metadata, sets up references between the host and the assembly, and then steps out of the way.

If you change the Assembly Link Location property or the name of the assembly and then rebuild your project, the _AssemblyLocation0 and _AssemblyName0 document properties will be updated during the build process. However, the build process will not update the security policy to reflect your change; security policies are updated only during the initial project creation. So, if you change either the Assembly Link Location or the assembly name, you will need to update your Microsoft .NET security settings to reflect the new file name or location.

You should also make note of the project's Copy Assembly property. If Copy Assembly is disabled or set to False, the build process will not copy the assembly to the link location. When you change the project's Assembly Link Location to a network path, the Copy Assembly property is automatically set to False. Likewise, when you change the Assembly Link Location to an HTTP path, the Copy Assembly property is disabled.

from: Smart Client Developer Center Home and Visual Studio Tools for Office

Comments

Add New Comment