File: xdobjApplication.htm

package info (click to toggle)
office2003-schemas 1.0%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, forky, sid, trixie
  • size: 42,304 kB
  • sloc: javascript: 2,429; makefile: 29
file content (9 lines) | stat: -rw-r--r-- 8,201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01021256"><META NAME="lcid" CONTENT="1033"><title>Application Object</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>Application Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><table class="ofvbaomart"><tr><td class="noborder" nowrap="true"><A HREF="xdobjApplication.htm" title="Application"><SPAN class="omblue">Application</SPAN></A><br /></td></tr></table><p>Represents the Microsoft Office InfoPath 2003 application. The <b class="bterm">Application</b> object includes properties and methods that return references to the high-level objects of the InfoPath object model. For example, the <b class="bterm"><a href="xdproXDocuments.htm" id="HV01021365" lcid=" ">XDocuments</a></b> property returns a reference to a collection of <b class="bterm"><a href="xdobjXDocument.htm" id="HV01021254" lcid=" ">XDocument</a></b> objects.</p><h2>Remarks</h2><p>The <b class="bterm">Application</b> object is the top-level object in the InfoPath object model, and it provides a number of properties and methods that can be used to access lower-level collections and objects in the object model, and to perform a variety of general purpose functions.</p><h2>Using the Application object</h2><p>The <b class="bterm">Application</b> object can be used directly in scripting code as in the following Microsoft <a href="#" class="glossary" onclick="AppendPopup(this,'ofjscript')" onkeypress="AppendPopup(this,'ofjscript')">JScript</a> example, which uses the <b class="bterm"><a href="xdmthAlert.htm" id="HV01021376" lcid=" ">Alert</a></b> method of the <b class="bterm"><a href="xdobjUI.htm" id="HV01021247" lcid=" ">UI</a></b> object, accessed through the <b class="bterm">XDocument</b> object, to display a message box that indicates the version number of the current instance of InfoPath:</p><pre><code>XDocument.UI.Alert("Application version: " + <b class="bterm">Application</b>.Version);</code></pre><p>Note that the <b class="bterm">XDocument</b> property was not qualified with the name of the <b class="bterm">Application</b> object. This is because both the <b class="bterm">Application</b> object and the <b class="bterm">XDocument</b> object are embedded directly in the InfoPath script engine, and therefore they do  not have to be explicitly declared. However, they  do need to be declared when used in an expression or argument, as the example above demonstrates.</p><p><b>Note</b>  The <b class="bterm">Application</b> object contains the following methods that can be used within InfoPath:</p><table><tr><th>Method</th><th>Description</th></tr><tr><td><b class="bterm"><a href="xdmthFormatString.htm" id="HV01025232" lcid=" ">FormatString</a></b></td><td>Formats the specified string or XML node according to the specified category and options parameters.</td></tr><tr><td><b class="bterm"><a href="xdmthIsDestinationReachable_HV01105347.htm" id="HV01105347" lcid=" ">IsDestinationReachable</a></b></td><td>Returns a Boolean value indicating whether the specified Uniform Resource Locator (URL), universal naming convention (UNC) path, or IP address of the destination computer can be connected to from the client computer.</td></tr><tr><td><b class="bterm"><a href="xdmthNewADODBConnection.htm" id="HV01042554" lcid=" ">NewADODBConnection</a></b></td><td>Creates and returns a reference to an empty ActiveX Data Objects (ADO) Connection object.</td></tr><tr><td><b class="bterm"><a href="xdmthNewADODBRecordset.htm" id="HV01042555" lcid=" ">NewADODBRecordset</a></b></td><td>Creates and returns a reference to an empty ActiveX Data Objects (ADO) Recordset object.</td></tr></table><p><b>Note</b>  The <b class="bterm">Application</b> object contains the following methods that can be used for external automation:</p><table><tr><th>Method</th><th>Description</th></tr><tr><td><a href="xdmthCacheSolution_1_HV01105346.htm" id="HV01105346" lcid=" "><b class="bterm">CacheSolution</b></a></td><td>Examines the <a href="#" class="glossary" onclick="AppendPopup(this,'xdformtemplate')" onkeypress="AppendPopup(this,'xdformtemplate')">form template</a> in the cache and, if necessary, updates it from the published location of the form template.</td></tr><tr><td><a href="xdmthQuit_1.htm" id="HV01021403" lcid=" "><b class="bterm">Quit</b></a></td><td>Quits the Microsoft Office InfoPath 2003 application.</td></tr><tr><td><a href="xdmthRegisterSolution_1_HV01105348.htm" id="HV01105348" lcid=" "><b class="bterm">RegisterSolution</b></a></td><td>Installs the specified Microsoft Office InfoPath form template.</td></tr><tr><td><a href="xdmthUnregisterSolution_1_HV01105349.htm" id="HV01105349" lcid=" "><b class="bterm">UnregisterSolution</b></a></td><td>Uninstalls the specified Microsoft Office InfoPath 2003 form template.</td></tr></table><p>The <b class="bterm">XDocuments</b> collection contains the following additional methods that can be used for external automation:</p><table><tr><th>Method</th><th>Description</th></tr><tr><td><a href="xdmthClose_1.htm" id="HV01021380" lcid=" "><b class="bterm">Close</b></a></td><td>Closes the specified Microsoft Office InfoPath 2003 form.</td></tr><tr><td><a href="xdmthNew_2.htm" id="HV01021394" lcid=" "><b class="bterm">New</b></a></td><td>Creates a new Microsoft Office InfoPath 2003 form based on the specified form.</td></tr><tr><td><a href="xdmthNewFromSolution_2.htm" id="HV01021395" lcid=" "><b class="bterm">NewFromSolution</b></a></td><td>Creates a new Microsoft Office InfoPath 2003 form based on the specified form template.</td></tr><tr><td><a href="xdmthNewFromSolutionWithData_HV01103984.htm" id="HV01103984" lcid=" "><b class="bterm">NewFromSolutionWithData</b></a></td><td>Creates a new Microsoft Office InfoPath 2003 form using the specified XML data and form template.</td></tr><tr><td><a href="xdmthOpen_2.htm" id="HV01021396" lcid=" "><b class="bterm">Open</b></a></td><td>Opens the specified Microsoft Office InfoPath 2003 form.</td></tr></table><p>Although the <a href="xdobjExternalApplication.htm" id="HV01024618" lcid=" "><b class="bterm">ExternalApplication</b></a> object is deprecated in Microsoft Office InfoPath 2003 Service Pack 1, replaced with the methods in the above tables, <b class="bterm">ExternalApplication</b> methods are still available for backward compatibility.</p><p>For more information about using the <b class="bterm">Application</b> object, see <a href="inconAccessingApplicationData.htm" id="HV01039906" lcid=" ">Accessing application data</a>.</p><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/xdobjApplication_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">&copy;2003-2004 Microsoft Corporation. All rights reserved.</a>  

Permission to copy, display and distribute this document is available at: <a 

href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&amp;CTT=11&amp;Origin=HV011232471033" 

target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>