简体   繁体   中英

MSXML : Javascript is not a scripting language

I have installed in my pc MSXML 2.6 MSXML 3.0 MSXML 4.0 MSXML 6.0

when i try to parse my XSL in execution time i have the error : Error -2147467259 Javascript is not a scripting language

My code:

Set ObjXMLTransformDoc = CreateObject("Msxml2.DOMDocument.5.0")

ObjXMLTransformDoc.Load (mResultPath & MyDocument.DOC_TYPE & "_XML_TO_XSL.xml")

Set ObjXMLTransformStyle = CreateObject("Msxml2.DOMDocument.5.0")
ObjXMLTransformStyle.Load ActiveWorkbook.path & "\RESULT\form_generation.xsl"
ObjXMLTransformStyle.setProperty "AllowXsltScript", True

Set ObjXMLStyle = CreateObject("Msxml2.DOMDocument.5.0")
ObjXMLTransformDoc.transformNodetoObject ObjXMLTransformStyle, ObjXMLStyle

Any ideas?

That code looks like VisualBasic script to me. I believe you will need to make sure your file has a .vbs extension, not .js . The big giveaway is using Set instead of the var keyword used by J[ava]Script. Also, the generous use of ampersand helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM