Software Developer's Kit - ChemDraw

Send comments on this topic
DataObject Property
See Also 

Description

Member of ChemDraw Control.Document.

Returns the DataObject of the document.

Property type

Read-only property

Syntax

Visual Basic
Public Property DataObject() As DataObject

Return Type

Example

'Declares variables
 Dim myDocument As ChemDrawControl11Ctl.Document 
'Retrieves data from a DataObject object
 Private Declare Function RegisterClipboardFormat Lib "user32" _
         Alias "RegisterClipboardFormatA" (ByVal lpString As String) As Long 
     Dim newDataType As Long 
     newDataType =  RegisterClipboardFormat("ChemDraw Interchange Format")
 Private Sub cmdCommand_Click()
     newDataType = RegisterClipboardFormat("ChemDraw InterchangeFormat")
     If  newDataType <> 0 Then
         Dim
newData As Variant
         newData = myDocument.DataObject.GetData(newDataType)
     End If
 End Sub

See Also