One-Off Forms


One other gotcha that you might run into when you use Outlook to build solutions is one-offing of a form. As discussed earlier, one-off forms are forms that contain their form definition directly in the item itself rather than querying or pulling from a forms library. A form can become a one-off form in Outlook in many ways. For example, if you hide or show a control on an Outlook form at run time, this will immediately one-off the form. Any sort of adding, hiding, or showing of controls on an Outlook form will one-off the form when the form is running in nondesign mode. This means that any future updates to the form definition will not be applied because Outlook will immediately save the form definition on the item and never check any form library for a new form definition.

You can identify a one-off form that you did not intend to one-off. One way is to look at the message class. One-off forms always have the default message class for that type of item but usually display a custom form. For example, if your custom form has a message class of IPM.Note.MyCustomForm and after running your form the message class of a saved item that uses the form appears to be IPM.Note , you have a one-off form problem.

Another way to identify a one-off form is to look at the size of the item. Because the form definition is saved on the item, the size of the item should increase.

The final way is to look at the icon for the item. If you are using custom icons, you will see that the icon will revert back to the standard icon for that type of item. This happens because the message class has reverted back to the standard message class for the type of item.

In a nutshell , avoid having your forms become one-off forms by avoiding the methods that one-off your forms and by quickly detecting when you are forcing Outlook to one-off your form via code.




Programming Microsoft Outlook and Microsoft Exchange 2003
Programming MicrosoftВ® OutlookВ® and Microsoft Exchange 2003, Third Edition (Pro-Developer)
ISBN: 0735614644
EAN: 2147483647
Year: 2003
Pages: 227
Authors: Thomas Rizzo

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net