我在pc上安装了MSXML 2.6 MSXML 3.0 MSXML 4.0 MSXML 6.0
当我尝试在执行时解析我的XSL时,出现错误: error -2147467259 Javascript不是一种脚本语言
我的代码:
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有什么想法吗?
发布于 2012-03-30 09:16:45
对我来说,这些代码看起来像是VisualBasic脚本。我相信你需要确保你的文件有一个.vbs扩展名,而不是.js。最大的泄漏是使用Set而不是JavaScript使用的var关键字。此外,“与”符号的大量使用也有帮助。
https://stackoverflow.com/questions/9920980
复制相似问题