Microsoft KB Archive/925192

= The &quot;Forms.TextBox&quot; control does not programmatically add a control in Outlook 2007 =

Article ID: 925192

Article Last Modified on 4/25/2007

-

APPLIES TO


 * Microsoft Office Outlook 2007

-



SYMPTOMS
When you pass a control that you created by adding a Forms.TextBox control to FormRegion.SetControlItemProperty, the control is sometimes removed from the form in Microsoft Office Outlook 2007. Additionally, the SetControlItemProperty method fails.



CAUSE
This behavior occurs because Outlook 2007 replaces the Forms.TextBox control with the Outlook.olkTextBox object.



WORKAROUND
To work around this behavior, perform one of the following actions:
 * Use the Outlook.olkTextBox object instead of the Forms.TextBox control.
 * Set the FormRegion.SuppressControlReplacement property to true before you add the control. This prevents Outlook 2007 from replacing the control.



MORE INFORMATION
For more information about what is new for developers in Outlook 2007, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/ms772422.aspx

Additional query words: OL2007 Outlook2007

Keywords: kbtshoot kbexpertiseinter kbprb KB925192

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.