Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Commented Unassigned: Outlook-Addin / Inspector.currentitem [21878]

$
0
0
Hi Sebastian,

There seems to be s small bug concerning the destruction of com-objects of inspector.currentitem in outlook in Netoffice 1.7.3
You can reproduce it by creating an instance of the class below in Addin_OnStartupComplete and then
e.g. copy a mail from the inbox in Outlook to the desktop, open it, close it, and then try to delete it or try to reopen it.

There will appear messageboxes saying that the object is in use.
_________________________
public class AddinTester
{
Outlook.NameSpace olNs;
Outlook.Application Outl;
Outlook.Inspectors olInsp;

public AddinTester(ref Outlook.Application OlApp)
{
Outl = OlApp;
olNs = (Outlook.NameSpace)Outl.GetNamespace("MAPI");

olInsp = (Outlook.Inspectors)OlApp.Inspectors;

olInsp.NewInspectorEvent += olInsp_NewInspectorEvent;
}

void olInsp_NewInspectorEvent(Outlook._Inspector Inspector)
{
if (Inspector.CurrentItem is Outlook.AppointmentItem)
System.Windows.Forms.MessageBox.Show("Appointment");
else
System.Windows.Forms.MessageBox.Show("No Appointment");
}
}


Best Regards,

Andreas
Comments: ** Comment from web user: _Andreas_ **

Hallo Sebastian,

gibt es irgend welche Fortschritte in der Sache?

Gruß

Andreas


Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>