Documents Collection

 

The Documents collection contains all open documents. The Documents collection provides the means to access map and worksheet documents.

 

Properties

Application

Count

Parent

 

Methods

Add

Open

CloseAll

Item*

SaveAll

 

*default method

 

Example

The following script demonstrates how the Documents collection is used.

 

Sub Main

'Declares mvApp as an object

 Dim mvApp As Object

 

'Creates an instance of the MapViewer Application

'object and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Declares Docs as an object

 Dim Docs As Object

 

'Assigns the Documents collection to the

'variable named "Docs"

 Set Docs = mvApp.Documents

End Sub