View Single Post
  #4  
Old March 25th 08, 02:10 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default save prompt and form region

That would indicate that somehow a reference is being kept alive for that
item, the release of that reference is allowing the item to be disposed of
and that's what's causing the prompt to save on closing Outlook. I don't
know if the reference is being kept alive by your ActiveX control or by some
other code in your addin but that has to be it.

If your control is changing settings in controls that are bound to Outlook
properties then changes to the controls would also change the Outlook
properties.

Probably the best thing would be to track your usage of all references to
the items in question and make sure you are disposing of them. To get
finality on your releasing the item you might want to use
Marshal.ReleaseComObject() on the item and then possibly even call
GC.Collect() followed by GC.WaitForPendingFinalizers().

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"sd" wrote in message
...
Thanks ken,
but the save prompt comes when I close Outlook not when I close the
item.The item gets closed without any prompt.Adding a userprop. should
ask for save for the first time ,once the prop. is added the save
prompt will not come.If this is correct then why save prompt comes
again?I checked customprop. change event also but invain.


Ads