Software Developer's Kit - ChemDraw

Send comments on this topic
Item Method
See Also 
index

The location of an object in a collection, counted from the top, starting with 1.

Description

Member of ChemDraw Control.Documents.

Given an index, returns one document from the documents collection.

Syntax

Visual Basic
Public Function Item( _
   Optional ByRef index As Variant _
) As Object

Parameters

index

The location of an object in a collection, counted from the top, starting with 1.

Return Type

Object

Remarks

Working with this property, allows returning a specific document from the collection of documents.

Example

'Declares variables 
 Dim myDocuments As ChemDrawControl11Ctl.Documents
 Set myDocuments = ctlChemDraw.Selection.Objects.Documents

 Private Sub cmdDocuments_Click()
    'returns the number of Documents in the Documents collection
     Text1.text = MyDocuments.Count 
    'returns the atoms of Item(1) of the Documents collection 
     Text2.text = MyDocuments.Item(1).Atoms
 End Sub

See Also