G
Goraya
Hi
I trying to connnect to a Comaddin using following code but evry time
I got an Exception object reference is not set to an object
instance.Here is the Code:
//Name of ComObject and wdApp represents MSWORD object
object objCom = "ALR.NETS.NetsWord.GL.Classes.NetsWord";
wdApp.COMAddIns.Item(ref objCom).Connect = true;
// This is second apporch
Type late = Type.GetTypeFromProgID("ALR.NETS.NetsWord.GL.Classes.NetsWord");
object obj = Activator.CreateInstance(late);
late.InvokeMember("NetsWord",BindingFlags.Default |
BindingFlags.InvokeMethod ,null,obj,null);
in both cases I got the same Exception.I am new to word
programming.Any help in this regard will be highly appriciated.......
I trying to connnect to a Comaddin using following code but evry time
I got an Exception object reference is not set to an object
instance.Here is the Code:
//Name of ComObject and wdApp represents MSWORD object
object objCom = "ALR.NETS.NetsWord.GL.Classes.NetsWord";
wdApp.COMAddIns.Item(ref objCom).Connect = true;
// This is second apporch
Type late = Type.GetTypeFromProgID("ALR.NETS.NetsWord.GL.Classes.NetsWord");
object obj = Activator.CreateInstance(late);
late.InvokeMember("NetsWord",BindingFlags.Default |
BindingFlags.InvokeMethod ,null,obj,null);
in both cases I got the same Exception.I am new to word
programming.Any help in this regard will be highly appriciated.......