VSTO Com-add in prevents Outlook Notes from closing first time
Rowland / Ken
I have the exact same scenario as Rowland. Have a C# addin for Outlook
(using VSTO 2005 not SE) and using Outlook 2003 SP2.
Ken - In my case - there is no programming done for notes. It is more
like wiring up the inspectors_NewInspector and inside that i check if
item being opened is mail item. If it is then - all the logic but if
not then just do nothing. Notes ofcourse falls inside the else block.
Recently I opened a case with Microsoft regarding this and am
currently working with them on this issue.
It seems that this issue is a bug (not related to coding in C#). Also
with the above logic - there have been some issues with calender
items. Again as mentioned above - I dont program for calender items -
so they all fall in else block but it seems that the inspector doesnt
release the reference even though i force Garbage collection.
Code in the else block (if not mail Item)
{
Marshal.ReleaseComObject(inspector)
inspector = null;
GC.WaitForPendingFinalizers();
GC.Collect();
}
Rowland - it also seems that depending on the Outlook version you are
running - u see a flavour of this issue.
My own developement machine has Outlook version 11.8120.8122 SP2 and
when i try to click "x" multiple times on the note - it crashes
outlook and restarts.
A test machine has Outlook version 11.8120.8107 SP2 and there the
behavior is that I need to click "x" twice before it closes the note.
It doesnt crash Outlook.
On speaking to the MS representative - it seems that could be a bug in
the product (VSTO or Outlook) but they are still looking into it.
Rowland - have u also seen issues for calender items (i am assuming
that u are also working with mail items).
Regarding notes - i will update this chain if i get a fix and it
works.........
Thanks
|