Software Developer's Kit - ChemDraw

Send comments on this topic
Captions Collection
See Also  Members 

Description

Member of ChemDraw Control.

For a list of all members defined for this collection, see Captions Members.

ChemDraw Captions Collection contains all of the caption objects in the document.  

Object Model

Remarks

Captions is a collection containing all of the captions objects in the ChemDraw document. If myCaptions is a captions collection object:

MyCaptions.Application    returns the application associated with the collection of captions
MyCaptions.Count          returns the number of captions in the collection 
MyCaptions.Item(i)        given an index, references one caption in particular from the collection of captions
MyCaptions.Parent         returns the parent of the captions collection 

Using myCaptions.Item(i) all the caption properties are enabled for myCaptions(i). This index starts with 1. 

Example

'Declares variables 
 Dim myCaptions As ChemDrawControl11Ctl.Captions
 
Set
myCaptions = ctlChemDraw.Selection.Objects.Captions

 Private Sub cmdCaptions_Click()
    'returns the application of the Captions collection
     
Text1.text = MyCaptions.Application 
    'returns the number of Captions in the Captions collection
     Text2.text = MyCaptions.Count
    'sets the Item(1) of the Captions collection   
     
myCaptions.Item(1).CaptionFace = 2
    'returns the face  of the caption 
     Text3.text = MyCaptions.Item(1).CaptionFace
 End Sub

See Also