XLL+ Class Library (6.3)

CXllApp::GetApplicationObject

Returns a .NET object containing a handle to the Excel.Application COM object.

static System::Object^ GetApplicationObject( );

Return Value

A .NET object which can be used by CLR code to access the Excel automation object, Excel.Application.

Remarks

A .NET method that receives this object can cast it to a handle to an _Application interface as in the following C# code.

using Microsoft.Office.Interop.Excel;
...
_Application app = appObj as _Application;

You must ensure that your add-in (or the assembly to which the value is passed) has a reference to the Excel Primary Interop Assembly.

Availability

The function is available only under CLR builds.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods