D
Dorian
I've developed an Outlook 2007 addin with VS2008 that gathers MailItem
information for insertion to a database. I handle the
Explorer.SelectionChange event and for some reason an exception is getting
logged with a few installs in the office:
System.Runtime.InteropServices.COMException (0xBBC40114): Outlook has
already begun transmitting this message.
at Microsoft.Office.Interop.Outlook._MailItem.get_EntryID()
at OutlookTracker.ThisAddIn.Explorer_SelectionChange()
Code:
private void Explorer_SelectionChange()
{
try
{
if (m_Explorer != null)
{
// We only care if there is a single collection
Selection sel = m_Explorer.Selection;
if (sel.Count == 1)
{
object item = sel[1];
if (item is MailItem)
{
MailItem mail = (MailItem)item;
if (vmHandler.LastItemId != mail.EntryID)
{
...Additional code here...
}
}
}
}
}
}
catch (Exception ex)
{
// Log error here
}
vmHandler is a class that facilitates the insertion to the database on a new
thread.
Anyone know what exactly is going on and how to make sure it doesn't occur?
information for insertion to a database. I handle the
Explorer.SelectionChange event and for some reason an exception is getting
logged with a few installs in the office:
System.Runtime.InteropServices.COMException (0xBBC40114): Outlook has
already begun transmitting this message.
at Microsoft.Office.Interop.Outlook._MailItem.get_EntryID()
at OutlookTracker.ThisAddIn.Explorer_SelectionChange()
Code:
private void Explorer_SelectionChange()
{
try
{
if (m_Explorer != null)
{
// We only care if there is a single collection
Selection sel = m_Explorer.Selection;
if (sel.Count == 1)
{
object item = sel[1];
if (item is MailItem)
{
MailItem mail = (MailItem)item;
if (vmHandler.LastItemId != mail.EntryID)
{
...Additional code here...
}
}
}
}
}
}
catch (Exception ex)
{
// Log error here
}
vmHandler is a class that facilitates the insertion to the database on a new
thread.
Anyone know what exactly is going on and how to make sure it doesn't occur?