Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ERRROR:
object doesnt support this property or method.
ActiveDocument.AssignSchema ANY THOUGHT?

VB
'====================
''Set xapp=CreateObject("XMLSpy.Application")
' Or uncomment the following line to try GetObject
'Set xapp=GetObject("", "XMLSpy.Application")
''xapp.Visible = True
''MsgBox "XMLSpy should now be visible"
''xapp.Quit
'====================
' the event handler function
Function DocEvent_OnBeforeCloseDocument(objDocument)
       Call WScript.Echo("received event - before closing document")
End Function
' create or connect to XMLSPY
Set objWshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objSpy = WScript.GetObject("", "XMLSpy.Application")
' If only Authentic is installed (and XMLSpy is not installed) use:
' Set objSpy = WScript.GetObject("", "AuthenticDesktop.Application")
' create document object and connect to its events
objSpy.Visible = True
Set objDoc = objSpy.Documents.OpenFile ("C:\\OrgChart.xml", False)
Call WScript.ConnectObject(objDoc, "DocEvent_")
'call the XSD schema file
Set appXSD = WScript.CreateObject("XMLSpy.Application")
Set ActiveDocument = objSpy
ActiveDocument.AssignSchema "C:\\fpml-main-5-1.xsd",true
Set objDlg= "c:\\test.html"
objSpy.Documents.GenerateSchemaDocumentation objDlg

'objSpy.ActiveDocument.AssignSchema  "C:\\fpml-main-5-1.xsd",False
' keep running while waiting on the event
' in the meantime close the document in XMLSPY manually
Call WScript.Echo ("sleeping for 10 seconds ...")
Call WScript.Sleep (10000)
Set objDoc = Nothing
Call WScript.Echo ("stopped listening for event")
Call objSpy.Quit


PLEASE REPLACE ' with ' (single quote)
Posted
Comments
Sandeep Mewara 5-May-11 2:52am    
Not clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900