XDocument Property (HTMLTaskPaneExternal Object)

Microsoft Office InfoPath

A read-only property that returns a reference to the XDocument object associated with a custom task pane.

expression.XDocument

expression    Required. An expression that returns a reference to the HTMLTaskPaneExternal object.

Security Level

0: Can be accessed without restrictions.

Remarks

The XDocument object returned by the XDocument property represents the form's underlying XML document that is associated with the custom task pane.

Example

In the following example, the HTMLTaskPaneExternal object is used through the external property of the Dynamic HTML (DHTML) window object to set a reference to the XDocument object that is part of the InfoPath object model:

var objXDoc;

objXDoc  = window.external.XDocument;
objXDoc.View.SwitchView("View2");