The Microsoft Office InfoPath 2003 object model is a COM-based object model that can be used to interact with InfoPath forms and their underlying XML documents. It is similar to other Microsoft Office application object models in that it implements interfaces for collections, objects, properties, methods, and events. However, the InfoPath object model is primarily used in scripting code, using the Microsoft Script Editor (MSE) that is built into InfoPath.
Note Unlike other Office applications that support complete application automation, the InfoPath object model supports automation of only certain features of the run-time editing environment.
The following sections discuss the InfoPath functional areas that the object model represents, the locations from which the object model can be accessed, and the levels of object model security.
The InfoPath object model is divided into a few main functional areas, with each area responsible for managing different aspects of an InfoPath form:
Within these higher-level objects are an assortment of lower-level objects that provide more granular information and control over an InfoPath form.
The InfoPath object model is manipulated through scripting code. Scripting code can be used in a variety of ways within a form, including the following:
The InfoPath object model implements three distinct levels of security. These security levels determine how and where a particular object model member can be used. There are three security levels in the InfoPath object model:
Note Each of the InfoPath object model language reference topics contains a security section that details the security level that applies to that object model member.
Viewing Service Pack 1 object model changes from the Object Browser
In Microsoft Office 2003 Editions Service Pack 1, the InfoPath object model was changed to add new objects and collections, and to add new functionality to some preexisting objects and collections. When viewed from the Object Browser in the Microsoft Script Editor, most new objects and collections are displayed with the string "Object" or "Collection" appended to their names. For example, in the Object Browser, the new Math object is displayed as MathObject, and the new DataAdapters collection is displayed as the DataAdaptersCollection. Additionally, most preexisting objects and collections that were changed are displayed as an object that has the string "Object" or "Collection" appended to its name along with an interface without the appended string. For example, the UI object that was changed in Service Pack 1 is displayed as the UIObject object along with the UI interface in the Object Browser. Regardless of how these new and changed objects are displayed in the Object Browser, your code should always call them using the name without "Object" or "Collection" appended to it.