Set objDoc = objSpy.Documents.OpenFile(objDlg.FileName, False)
Set objDoc = Nothing
End If
End If
If nID = 4 Or nID = 6 Then
Set objDlg = CreateObject("MSComDlg.CommonDialog")
objDlg.Filter = "All Files (*.*)|*.*||"
objDlg.ShowSave
If Len(objDlg.FileName) > 0 Then
Set objDoc = objSpy.ActiveDocument
If Not (objDoc Is Nothing) Then
objDoc.SetPathName objDlg.FileName
objDoc.Save
Set objDoc = Nothing
End If
End If
End If
Set objSpy = Nothing
End If
End Sub
Public Function IXMLSpyPlugIn_OnUpdateCommand(ByVal nID As Long, ByVal pXMLSpy As Object) As SPYUpdateAction
IXMLSpyPlugIn_OnUpdateCommand = spyDisable
If (Not (pXMLSpy Is Nothing)) Then
Dim objSpy As XMLSpyLib.Application
Set objSpy = pXMLSpy
If nID = 3 Or nID = 5 Then
IXMLSpyPlugIn_OnUpdateCommand = spyEnable
End If
If nID = 4 Or nID = 6 Then
If objSpy.Documents.Count > 0 Then
IXMLSpyPlugIn_OnUpdateCommand = spyEnable
Else
IXMLSpyPlugIn_OnUpdateCommand = spyDisable
End If
End If
End If
End Function
Public Function IXMLSpyPlugIn_GetDescription() As String
IXMLSpyPlugIn_GetDescription = "Sample Plug-in for XMLSpy;This Plug-in demonstrates the implementation of a simple VisualBasic DLL as a Plug-in for XMLSpy."