P
Pascal Lenormand
Hi,
I did an AddIn for the MS Project 2002 in C#.
In this addin, I add a new HTML page in the left side pane.
In this html page, I have jscript code where I want to call a method of
my C# addin.
Here is what I tried :
function RunProjectPlan()
{
var application = window.external.application;
var addin = application.COMAddIns("Addin.Connect");
if (addin) {
var name = addin.GetName();
}
}
At runtime, I've got the error :
Object doesn't support this property or method.
Here is the C# class for my addin :
namespace Addin {
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface ConnectInterface {
void DisplayMessage();
string GetName();
}
[GuidAttribute("5D921954-FA0E-491F-AAA1-D27230DA3D29"),
ProgId("Addin.Connect")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Connect : Object, Extensibility.IDTExtensibility2,
ConnectInterface
{
....
}
}
One more information. I tried to call this method in an other
application which has this COM component as reference, and the method is
called.
What am I doing wrong ?
Thanks for your help.
Pascal Lenormand
I did an AddIn for the MS Project 2002 in C#.
In this addin, I add a new HTML page in the left side pane.
In this html page, I have jscript code where I want to call a method of
my C# addin.
Here is what I tried :
function RunProjectPlan()
{
var application = window.external.application;
var addin = application.COMAddIns("Addin.Connect");
if (addin) {
var name = addin.GetName();
}
}
At runtime, I've got the error :
Object doesn't support this property or method.
Here is the C# class for my addin :
namespace Addin {
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface ConnectInterface {
void DisplayMessage();
string GetName();
}
[GuidAttribute("5D921954-FA0E-491F-AAA1-D27230DA3D29"),
ProgId("Addin.Connect")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Connect : Object, Extensibility.IDTExtensibility2,
ConnectInterface
{
....
}
}
One more information. I tried to call this method in an other
application which has this COM component as reference, and the method is
called.
What am I doing wrong ?
Thanks for your help.
Pascal Lenormand