Software Developer's Kit - ChemDraw

Send comments on this topic
DataObject Property
See Also 


Member of ChemDraw Control.Document.

Returns the DataObject of the document.

Property type

Read-only property


Visual Basic
Public Property DataObject() As DataObject

Return Type


'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
newData As Variant
         newData = myDocument.DataObject.GetData(newDataType)
     End If
 End Sub

See Also