Implements ISmartDocument
'CONSTANTS
'You must have one constant for the schema namespace, one constant for each
'schema element that you want to provide smart document controls for
'and actions for, and one constant for the total number of schema elements
'that have associated actions.
'Because XML is case sensitive, the values
'of these constants must be exact both in spelling and in case.
'Therefore, if the textBox element is spelled with a
'capital B in the XML schema, you must assign the
'value of the cTEXTBOX constant as "cNAMESPACE & #textBox".
'Namespace constant
Const cNAMESPACE As String = "urn:schemas-xml-office:SDGraph"
'Element constants
Const cActiveX As String = cNAMESPACE & "#SDActiveX"
'Number of types (or element constants)
Const cTYPES As Integer = 1
'Constants
Private strPath As String
Private strApp As String
Private Sub ISmartDocument_SmartDocInitialize(ByVal ApplicationName As String, ByVal Document As Object, ByVal SolutionPath As String, ByVal SolutionRegKeyRoot As String)
strPath = Document.Path & "\"
strApp = Document.Application.Name
End Sub
Private Property Get ISmartDocument_SmartDocXmlTypeCount() As Long
ISmartDocument_SmartDocXmlTypeCount = cTYPES
End Property
Private Property Get ISmartDocument_SmartDocXmlTypeName( _
ByVal XMLTypeID As Long) As String
Select Case XMLTypeID
Case 1
ISmartDocument_SmartDocXmlTypeName = cActiveX
Case Else
End Select
End Property
Private Property Get ISmartDocument_SmartDocXmlTypeCaption( _
ByVal XMLTypeID As Long, ByVal LocaleID As Long) As String
Select Case XMLTypeID
Case 1
ISmartDocument_SmartDocXmlTypeCaption = "Microsoft Graph"
Case Else
End Select
End Property
Private Property Get ISmartDocument_ControlCount( _
ByVal XMLTypeName As String) As Long
Select Case XMLTypeName
Case cActiveX
ISmartDocument_ControlCount = 1
Case Else
End Select
End Property
'The ControlID for the first control that you add is 1.
'For more information about how to specify the ControlID, see the ControlID reference
'topic in the References section of this SDK.
Private Property Get ISmartDocument_ControlID( _
ByVal XMLTypeName As String, _
ByVal ControlIndex As Long) As Long
Select Case XMLTypeName
Case cActiveX
ISmartDocument_ControlID = ControlIndex
Case Else
End Select
End Property
Private Property Get ISmartDocument_ControlNameFromID( _
ByVal ControlID As Long) As String
'This subroutine is intentionally left empty.
End Property
Private Property Get ISmartDocument_ControlCaptionFromID( _
ByVal ControlID As Long, ByVal ApplicationName As String, _
ByVal LocaleID As Long, ByVal Text As String, _
ByVal Xml As String, ByVal Target As Object) As String
Select Case ControlID
Case 1
ISmartDocument_ControlCaptionFromID = "Microsoft Graph"
ISmartDocument_ControlCaptionFromID = "{00020803-0000-0000-C000-000000000046}" ' MSGraph.Chart
'ISmartDocument_ControlCaptionFromID = "{0002E55D-0000-0000-C000-000000000046}" 'OWC11 Chart
Case Else
End Select
End Property
Private Property Get ISmartDocument_ControlTypeFromID( _
ByVal ControlID As Long, _
ByVal ApplicationName As String, _
ByVal LocaleID As Long) As SmartTagLib.C_TYPE
Select Case ControlID
Case 1
ISmartDocument_ControlTypeFromID = C_TYPE_ACTIVEX
Case Else
End Select
End Property
Private Sub ISmartDocument_PopulateActiveXProps(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, ByVal ActiveXPropBag As SmartTagLib.ISmartDocProperties)
Dim ControlIndex As Integer
ControlIndex = 0
If ControlID = 1 Then
Select Case ControlIndex
Case 0
Props.Write "X", "5"
Props.Write "Y", "0"
Props.Write "H", "180"
Props.Write "W", "180"
End Select
End If
End Sub
Private Sub ISmartDocument_PopulateCheckbox(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, Checked As Boolean)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateDocumentFragment(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, DocumentFragment As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateHelpContent(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, Content As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateImage(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, ImageSrc As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateListOrComboContent(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, List() As String, count As Long, InitialSelected As Long)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateOther(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateRadioGroup(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal LocaleID As Long, ByVal Text As String, ByVal Xml As String, ByVal Target As Object, ByVal Props As SmartTagLib.ISmartDocProperties, List() As String, count As Long, InitialSelected As Long)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_PopulateTextboxContent( _
ByVal ControlID As Long, ByVal ApplicationName As String, _
ByVal LocaleID As Long, ByVal Text As String, _
ByVal Xml As String, ByVal Target As Object, _
ByVal Props As SmartTagLib.ISmartDocProperties, Value As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_ImageClick(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal Target As Object, ByVal Text As String, ByVal Xml As String, ByVal LocaleID As Long, ByVal XCoordinate As Long, ByVal YCoordinate As Long)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_InvokeControl(ByVal ControlID As Long, ByVal ApplicationName As String, ByVal Target As Object, ByVal Text As String, ByVal Xml As String, ByVal LocaleID As Long)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_OnCheckboxChange(ByVal ControlID As Long, ByVal Target As Object, ByVal Checked As Boolean)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_OnListOrComboSelectChange(ByVal ControlID As Long, ByVal Target As Object, ByVal Selected As Long, ByVal Value As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_OnRadioGroupSelectChange(ByVal ControlID As Long, ByVal Target As Object, ByVal Selected As Long, ByVal Value As String)
'This subroutine is intentionally left empty.
End Sub
'After you enter something in the text box,
'the SimpleSample smart document displays a message that says "Hello".
Private Sub ISmartDocument_OnTextboxContentChange( _
ByVal ControlID As Long, ByVal Target As Object, _
ByVal Value As String)
'This subroutine is intentionally left empty.
End Sub
Private Sub ISmartDocument_OnPaneUpdateComplete(ByVal Document As Object)
'This subroutine is intentionally left empty.
End Sub