VSTO and Managed Code

When you create VBA solutions for Word and Excel, your code typically is stored in the document or in an attached or global template. To access code in a template separate from your solution, you set a reference from your document to the template.

However, when you create VSTO solutions, your code is stored in an assembly. You can set references in your project to other assemblies, such as .NET Framework assemblies and interop assemblies, but you cannot set a reference to other VSTO solution assemblies. Only one VSTO solution assembly can be associated with a document or workbook. However, multiple documents can reference the same solution assembly. This is the case when you create multiple documents based on a VSTO-customized template. Note that because Outlook solutions are application-level, you can load multiple add-ins into Outlook. The same is true for add-ins created with VSTO 2005 SE.

0 0

Post a comment