Software Developer's Kit - ChemDraw

Send comments on this topic
ActiveDocument Property
See Also 

Description

Member of ChemDrawCtl.

Returns the currently active document of the ActiveX control.

Property type

Read-only property

Syntax

Visual Basic
Public Property ActiveDocument() As Document

Return Type

Example

'Active Document 
 Private Sub cmdCommand_click()
    'the number of atoms in the control will be shown
     cmdCommand.Caption = ChemDrawCtl.ActiveDocument.Atoms.Count
     Text1.text = ctlChemDraw.ActiveDocument.NumPagesWide
     ctlChemDraw.ActiveDocument.SaveAs "c:\FileName.cdx", cdx
     Text2.text = ctlChemDraw.ActiveDocument.NumPagesWide 
    'pastes the content of the clipboard 
     ctlChemDraw.ActiveDocument.Paste
 End Sub

 

See Also