Considerations for upgrading form templates that use managed code

If you created an InfoPath 2003 form template using one of the InfoPath 2003 Toolkits for Microsoft Visual Studio and you want to maintain compatibility with InfoPath 2003, you can continue to work on and further develop your form template project by opening it in Microsoft Office InfoPath 2007 and the Microsoft Visual Studio 2005 Tools for Applications (VSTA) environment, or in Microsoft Visual Studio 2005 with Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System. When you do this, the business logic in your form template will continue to use the .NET object model provided by the Microsoft.Office.Interop.InfoPath.SemiTrust namespace.

Alternatively, you can migrate and upgrade the code in your InfoPath 2003 form template project to use the new .NET object model provided by the Microsoft.Office.InfoPath namespace. When doing so, all of your business logic code will need to be re-written to use members of the Microsoft.Office.InfoPath namespace, but all of the code from your previous project is retained and surrounded by #if InfoPathManagedObjectModel and #endif statements (Visual C#) or #If InfoPathManagedObjectModel and #End If statements (Visual Basic) for your reference during the process of re-writing the code.

If you displayed this topic by clicking Help on the dialog box prompting "Do you want to upgrade your code to use the Microsoft Office InfoPath object model?", do one of the following:

  • Click No to maintain compatibility with InfoPath 2003 and continue to use the .NET object model provided by the Microsoft.Office.Interop.InfoPath.SemiTrust namespace.

  • Click Yes to upgrade the code in your InfoPath 2003 form template project to use the new .NET object model provided by the Microsoft.Office.InfoPath namespace.

For more information about working with managed code form templates, refer to the InfoPath 2007 Developer Reference for Managed Code Form Templates documentation in the Visual Studio Tools for Applications or Visual Studio 2005 development environments.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×