Documents (Collection)

Member of:

Application object

Description:

Represents all document objects in applications.

Note:

The Document.Close() Documents.Open(), and Documents.Name (Property) are not supported in EPM Workspace.

Tip:

All collections have the "Item(NameOrIndex)" method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")\

Example:

This example shows how to print all open document names to the Console window. It compares these names with the ActiveDocument (the document which has Focus) and appends its name with “Active”:

For (I= 1;I <= Documents.Count;I++)
           {
           if (Documents[I].Name == ActiveDocument.Name)
                      Console.Writeln(ActiveDocument.Name + "- Active")
           else
                      Console.Writeln (Documents[I].Name)
           }

Methods:

Add([optional] Name As String), Item(Value as Name or Index) New([optional] Name As String), Open(Filename As String, DisplayName as String)

Properties:

Read-only: Property Count As Number