contact form force not dirty

S

sublimese

I am having an issue that I am wondering if anyone can shed some light
on.
I have customized an outlook contact form by making the second tab "P.
2" visible, then adding additional controls to it. I have code in the
Item_Open event on the contact form that sets the visible text of the
tab with code similar to:

dim objPages
dim objPage
set objPages = item.getinspector.modifiedformpages
set objPage = objPages(1)

objPage.Name = NewValue

however this line of code causes the Contact form to become "dirty".

For example, if I open a contact, then immediately after the contact
opens I close the contact, Outlook tells me that data has changed and
asks if I want to save my changes.

If I remove "objPage.Name = NewValue" from the Item_Open event, when I
open a contact and immediately close it, it just closes and I am not
prompted to save.

Is there a way to dynamically set the visible text of the tab on a
contact form without causing the contact form to become "dirty"? Or
failing that is there a way to tell the contact form that it is not
"dirty" without saving the contact form?

This is occurring on both Outlook 2003 and Outlook 2007.
The code in question is running on the Outlook Contact form, but there
is also an addin involved if there is a way to accomplish the
necessary task from the addin.

If there is no way to accomplish this task using the Outlook form or
with an addin, is it possible to do it through any level of code c++,
exchange client extension, etc...

Thank you
 
S

Sue Mosher [MVP-Outlook]

Maybe a dumb question, but why not rename the page in the form design itself? I suspect that renaming it at run time will one-off the item, which will cause problems.

There is no way to "undirty" an item other than to save it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top