The following code fails on the ae.Members.Add statement with
Failed to proceed Method on Outlook.AddressEntries=>Add.
Exception has been thrown by the target of an invocation.
An attempt was made to open an unsupported property.
NetOffice.OutlookApi.Application oApp = new NetOffice.OutlookApi.Application();
foreach (AddressList al in oApp.GetNamespace("MAPI").AddressLists)
{
foreach (AddressEntry ae in al.AddressEntries)
{
if (ae.Name == "MPTC members" && ae.Type == "MAPIPDL")
{
ae.Members.Add("SMTP", "Bob", "someone@somewhere.com");
}
}
}
The following code fails on the ae.Members.Add statement with
Failed to proceed Method on Outlook.AddressEntries=>Add. Exception has been thrown by the target of an invocation. An attempt was made to open an unsupported property.
Any ideas?