0
votes

I'm developing an Outlook 2003-Addin. Now I have the following problem: an user saves his mail on the desktop and opens it. After closing it, the mail can't be opend again until outlook is closed and opend again. The error says, that the mail can't be opend because it is in access of another programm. If the addin is disabled you can open and reopen the file without problems. The file is still in access although the window is closed. It's the same Problem discribed here: How to release Outlook MailItem correct? I found the method Marshal.ReleaseComObject(_mailItem)to release the mailItem, but it doesn't work for me. I call it in the _mailItem_Close-event. But it doesn't work and I don't know what is wrong. Is it the wrong place or the wrong method? Thanks for your help!

1

1 Answers

0
votes

Why do you need the Close event? Release the object immediately after displaying it and avoid using multiple dot notation. What is your code that accesses the MSG file?