Software Developer's Kit - ChemDraw

Send comments on this topic
Add Method
See Also 

Description

Member of ChemDraw Control.Documents.

Adds a document to the collection of documents.

Syntax

Visual Basic
Public Function Add() As Document

Return Type

Document

Remarks

Creates a new document, adding one to the collection of documents.

Example

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

 Private Sub cmdAdd_Click() 
    'adds a document
     myDocuments.Add CurDir() & "\FileName.cdx", False
     Set myDocuments.Item(1) = ctlChemDraw.ActiveDocument
 End Sub

See Also