Chris Losinger
Posts: 4
Joined: 2008-11-12
|
We have an Outlook add-in, written with AddInExpress .Net 2008 v4.3. Recently, we've seen two things which are giving us some concern:
1. From time to time, Outlook will apparently fail to close properly, and will complain about unclosed data files, the next time it starts. Is this something we're causing? Is there anything in Add-in Express or the Outlook object model that we're doing (or not doing) which would cause this? I've triple-checked all of the Outlook._MailItem.UserProperties and Outlook._Explorer.Selection[x] objects to make sure we're calling ReleaseComObject when we're done... but it still happens.
2. When the addin is enabled, Outlook's Mail Folders pane apparently gets confused and starts forgetting to erase selection rectangles on folders: click a folder, Outlook draws a blue (or sometimes gray?) selection rect around the folder. Click another folder, Outlook should erase the old selection rect and draw a new one on the new folder. But it sometimes doesn't do that - it leaves the old selection rect, and draws a new one. So it looks like you've multi-selected folders (which you can't do). Sometimes you can get all of the folders to draw selected, sometimes it will clear the rect on a folder. It will draw correctly if you resize the Folder pane.
Has anyone seen either of these before? |
|
Andrei Smolin
Add-in Express team
Posts: 18825
Joined: 2006-05-11
|
|
Chris Losinger
Posts: 4
Joined: 2008-11-12
|
thanks for the info.
1. read the article... have a question...
we have code like this everywhere in our addin:
Outlook.Selection selection = OutlookApp.ActiveExplorer().Selection;
and
object olitem = OutlookApp.ActiveInspector().CurrentItem;
and
object olitem = OutlookApp.Application.GetNamespace("MAPI").GetItemFromID(sEntryID, System.Type.Missing);
do all those chained references need to broken down so that we can do ReleaseComObject calls on each sub-part ?
and, what's the best way to know which parts of a chain like that need to be Released, and which don't ? |
|
Andrei Smolin
Add-in Express team
Posts: 18825
Joined: 2006-05-11
|
Chris,
do all those chained references need to broken down so that we can do ReleaseComObject calls on each sub-part ?
Yes.
what's the best way to know which parts of a chain like that need to be Released, and which don't ?
In the same article, see the following chapter:
How to determine if this or that property or method returns a COM object?
Andrei Smolin
Add-in Express Team Leader |
|