Introducing the InfoPath Object Model

 <  Day Day Up  >  

The InfoPath object model is provided so that developers have a standard application programming interface to manipulate many parts of an InfoPath application or form template. Unlike the object models of several other Microsoft Office applications, InfoPath 2003's object model can be manipulated only by JScript or VBScript. There is no Visual Basic for Applications (VBA) functionality in InfoPath, but there is limited access through the ExternalApplication object.

Each object, property, or method of the InfoPath object model has one of three possible security levels assigned to it. The security levels are numbered 0, 2, and 3:

  • Security level 0 objects, properties, and methods can be accessed by any InfoPath form template.

  • Security level 2 objects, properties, and methods can be accessed by InfoPath forms whose URL is in the same domain, or by forms whose domain has been granted cross-domain permissions.

  • Security level 3 object model components are accessible only in fully trusted forms.

Microsoft has indicated that level 1 is reserved for future use.

INFOPATH SECURITY

InfoPath security issues are described in Chapter 12, "Security and InfoPath Forms."


I will first describe the Application object, which is the top-level object of the InfoPath object model. Other objects will be described in alphabetical order. All methods and properties of objects will be listed, and selected properties and methods will be described in more detail. Sample form templates will typically use JScript rather than VBScript. Note that form templates are included in the code download, but the code isn't presented in detail in the chapter.

"PERMISSION DENIED" ERROR MESSAGES

If you receive a "Permission Denied" error message when testing a form template, it is likely that you are attempting to use a security level 3 method or property in a form template that isn't fully trusted. You need to install the form template using an installer created using the regform.exe utility before you can test security level 3 functionality.


 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

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