Click here to Skip to main content
13,045,790 members (46,253 online)
Rate this:
Please Sign up or sign in to vote.
See more:
object doesnt support this property or method.
ActiveDocument.AssignSchema ANY THOUGHT?

''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"
' 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 4-May-11 9:23am
S 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 May 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100