Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Reference
 RequestComAddInAutomationService Me...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Tools for Office API Reference
AddIn..::.RequestComAddInAutomationService Method (2007 System)

Returns an object in your add-in that can be used by other solutions.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)
Visual Basic (Declaration)
Protected Overridable Function RequestComAddInAutomationService As Object
Visual Basic (Usage)
Dim returnValue As Object

returnValue = Me.RequestComAddInAutomationService()
C#
protected virtual Object RequestComAddInAutomationService()

Return Value

Type: System..::.Object
An object that you want to expose to other add-ins.

Override this method to expose an object in your add-in to other solutions. This includes other add-ins and document-level customizations running in the same application process, VBA code, and external automation code.

The object that you return must be public, it must be visible to COM, and it must expose the IDispatch interface. If the object you return does not meet these requirements, the Visual Studio Tools for Office runtime will throw an InvalidCastException after it calls your implementation.

For more information, see Calling Code in Application-Level Add-ins from Other Solutions.

For a code example that demonstrates how to override the RequestComAddInAutomationService method, see Walkthrough: Calling Code in an Application-Level Add-in from VBA.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker