H
hemaneelagiri via OfficeKB.com
hi
i am developing an application in that i have contacts. i am synchronizing
the data with my database to my outlook contacts.
i am using below code
_____________________________________
Microsoft.Office.Interop.Outlook.ContactItem contactItem= (Microsoft.Office.
Interop.Outlook.ContactItem)fldContacts.Items.Add(Microsoft.Office.Interop.
Outlook.OlItemType.olContactItem);
contactItem.CustomerID = ((int)objType).ToString() + "_" + dr["AddresseId"].
ToString().Trim();
contactItem.FirstName = dr["FirstName"].ToString();ontactItem.Gender =
Microsoft.Office.Interop.Outlook.OlGender.olMale;
contactItem.Email1Address = dt.Rows["CommValue"].ToString();
contactItem.Categories = contactItem.Categories + ";" + "my new";
contactItem.Save();
__________________________________
except one system it is working fine in all other systems.
and bellow erroe is coming in that system
"Unable to cast COM object of type 'System._ComObject' to interface type
'Microsoft.Office.Interop.Outlook._ContactItem'. This Operation failed
because the queryinterface call on the COM Component for the interface with
IID'{00063021-0000-0000-C000-000000000046}' failed due to the follwing error.
No such interface suported(Exception from HRESULT.0x80004002(E_NOINTERFACE)).
"
we are not able find why it si coming
please help
i am developing an application in that i have contacts. i am synchronizing
the data with my database to my outlook contacts.
i am using below code
_____________________________________
Microsoft.Office.Interop.Outlook.ContactItem contactItem= (Microsoft.Office.
Interop.Outlook.ContactItem)fldContacts.Items.Add(Microsoft.Office.Interop.
Outlook.OlItemType.olContactItem);
contactItem.CustomerID = ((int)objType).ToString() + "_" + dr["AddresseId"].
ToString().Trim();
contactItem.FirstName = dr["FirstName"].ToString();ontactItem.Gender =
Microsoft.Office.Interop.Outlook.OlGender.olMale;
contactItem.Email1Address = dt.Rows["CommValue"].ToString();
contactItem.Categories = contactItem.Categories + ";" + "my new";
contactItem.Save();
__________________________________
except one system it is working fine in all other systems.
and bellow erroe is coming in that system
"Unable to cast COM object of type 'System._ComObject' to interface type
'Microsoft.Office.Interop.Outlook._ContactItem'. This Operation failed
because the queryinterface call on the COM Component for the interface with
IID'{00063021-0000-0000-C000-000000000046}' failed due to the follwing error.
No such interface suported(Exception from HRESULT.0x80004002(E_NOINTERFACE)).
"
we are not able find why it si coming
please help