G
GSK
I have created a outlook 2003 add in VS 2005. I am referencing the add-in in
a custom outlook form. I am not able to call the Test method from the from,
am getting the error "object required". Pls find the code below. Kindly help
me in identifiying this issue.
--------------------------------------------------------------------------------------
Add-in Code :
namespace OutlookTest
{
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
public void Test(string Name)
{
MessageBox.Show(Name);
}
}
------------------------------------------------------------------------------------------
Custom form code
Function Item_Open()
Set myObj = Application.COMAddIns.Item("OutlookTest")
myObj.Connect = True
Set oCOMAddinObj = GetObject("","OutlookTest")
oCOMAddinObj.Test("Add-in call") /--Getting error in this line..
End Function
------------------------------------------------------------------------------------------
a custom outlook form. I am not able to call the Test method from the from,
am getting the error "object required". Pls find the code below. Kindly help
me in identifiying this issue.
--------------------------------------------------------------------------------------
Add-in Code :
namespace OutlookTest
{
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
public void Test(string Name)
{
MessageBox.Show(Name);
}
}
------------------------------------------------------------------------------------------
Custom form code
Function Item_Open()
Set myObj = Application.COMAddIns.Item("OutlookTest")
myObj.Connect = True
Set oCOMAddinObj = GetObject("","OutlookTest")
oCOMAddinObj.Test("Add-in call") /--Getting error in this line..
End Function
------------------------------------------------------------------------------------------