I would recommend an inspector wrapper. this example is for explorers,
but the concept is the same:
http://www.outlookcode.com/codedetail.aspx?id=789
let me know if you have any troubles.
Rog
Sanjay wrote:
Sorry.. I provided some incorrect information.. Let me try again..
the the above events wired up, If is set the bool cancel to true in
MailItem_Send, MailItem_Close is skipped and Inspector_Close is fired.
Where as when I close the message window, MailItem_Close gets fired and
then there is a popup box displayed asking if I want to save the
message before closing.
Now my issues is that I display custom UI elements in the inspector
window and need to place the cleanup code somewhere. This cleanup code
would include unwiring of events.
Can't use Inspector_Close because it gets called event if the bool
cancel is set to true in MailItem_Close
Can't use MailItem_Close because it gets called before the popup is
displayed asking the user if they want to save the edits for later as
draft and if the user hits cancel, the inspector is still available.
Hope this makes sense.
Sanjay