View Single Post
  #3  
Old January 10th 08, 06:07 PM posted to microsoft.public.outlook.program_forms
karlman[_2_]
external usenet poster
 
Posts: 18
Default Custom form not saving when fields changed programatically

On Jan 10, 7:41*am, "Sue Mosher [MVP-Outlook]"
wrote:
Dirtying the Subject property should work.

--
Sue Mosher, Outlook MVP
* *Author of Microsoft Outlook 2007 Programming:
* * *Jumpstart for Power Users and Administrators
* *http://www.outlookcode.com/article.aspx?id=54



"karlman" wrote in ...
Is there a way to force a form as "dirty" so Outlook attempts to save
it if someone clicks the 'X'?


I am changing the HTMLBody and even a custom field but the if I click
the 'X' then the form closes without saving. If I change any field
using the GUI then it does ask to save if I press the 'X'.


I have code that tells me if the form is dirty. Should I add something
in the Item_Close event and force the save at that point?


Thanks
Karl- Hide quoted text -


- Show quoted text -


I was attempting to use the Milage property to no effect. I tried the
subject and that did not work either. I even put the subject field on
the form and can watch it change but Outlook still thinks it is a
"clean" form.

Interestingly, if I dirty the subject field manually through the GUI
then the form becomes dirty. Form some reason changing a custom or
builtin property through code is not dirtying the form. Only if I do
it throught the GUI.

I am probably missing something simple here. Maybe a setting on the
form?

Thanks
Karl
Ads