Documents Collection

Visual LANSA

Documents Collection

Documents is the type of object most commonly used in Microsoft Word. The Word application contains a document's collection object that consists of all documents currently open in Word and a document object.

To see the Documents property of the Word application, open the Features help for the Word application.

Double-click the Document's property to display the Document's collection. You can use the methods of the document's collection to create new documents (Add method).

You refer to members of the document collection (individual documents) by specifying the document's key. This key can be either the name of the document or its number (documents are numbered in the order you create or open them.) This is the syntax:

invoke method(#wordapp.documents.item<'test.doc'>.activate)

 

or

invoke method(#wordapp.documents.item<1>.activate)

 

Ý 7.2.2 Accessing the Application's Objects