<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="dispatch.xsl" ?>
<Object name="Documents" project="SuperEdi">

  <Title>Documents Object</Title>

  <Description>The Documents object represents a collection of all
    open documents. It provides methods to enumerate these documents,
    add new documents and close open documents.</Description>

  <Keywords>Documents, Add, Close, Count, Open, Item</Keywords>
  
  <!-- Properties -->

  <Property name="Application" type="Application" write="no" xlink="yes">
  	<Description>Returns the Application object.</Description>
  </Property>

  <Property name="Count" type="short" write="no">
  	<Description>Returns the number of currently open documents.</Description>
  </Property>

  <Property name="Parent" type="Application" write="no" xlink="yes">
  	<Description>Returns the Application object.</Description>
  </Property>

  <!-- Methods -->

  <Method name="Add">
	<Description>Creates a new document and adds it to the collection. 
	  Returns the document that was created.</Description>
    <Syntax>newDoc = documents.Add()</Syntax>
    <Return type="Document" xlink="yes"/>
  </Method>

  <Method name="Close">
	<Description>Closes all documents in the collection.</Description>
    <Syntax>documents.Close()</Syntax>
  </Method>

  <Method name="Item">
	<Description>Returns a Document object from the collection or 
	  returns null if the document does not exist.
      The Item method is the default member.</Description>
    <Syntax>firstDoc = documents( 0 )</Syntax>
	<Parameter name="index" type="variant">
	  <Description>Indicates the document's full path name or the
	    ordered position within the collection.</Description>
	</Parameter>
	<Return type="Document" xlink="yes"/>
  </Method>

  <Method name="Open">
	<Description>Opens an existing document and adds it to the collection.
	  Returns the document that was opened, or null if the object could 
	  not be opened.</Description>
    <Syntax>doc = documents.Open( filename )</Syntax>
	<Parameter name="filename" type="string" />
	<Return type="Document" xlink="yes"/>
  </Method>

</Object>
