Question
MSXML 4.0 needed for COM object invocation?
Hi,
Do I need MSXML 4.0 for the <CFOBJECT> tag to worK? Coz I dont have this right now and I am gettign the following error when i try to instantiate a COM object.
Error:
"An exception occurred when instantiating a Com object. The cause of this exception was that: coldfusion.runtime.com.ComObjectInstantiationException: An exception occurred when instantiating a Com object..
The error occurred on line 5. "
Code:
<HTML>
<HEAD>
<TITLE> Test</TITLE>
</HEAD>
<CFOBJECT TYPE="COM" NAME="MyWord" CLASS="WINWORD.EXE" ACTION="Connect" CONTEXT="Local">
<CFSET MyWord.Visible="False">
<CFSET OriginalDoc=MyWord.Documents>
<CFSET OriginalDoc.Open("C:\wwwroot\test.doc")>
<CFSET ConvertedDoc=MyWord.ActiveDocument>
<CFSET ConvertedDoc.SaveAs("C:\wwwroot\Test\test.html",Val(8))>
<CFSET MyWord.Quit()>
<CFSET ReleaseComObject(MyWord)>
<BODY>
<TABLE>
<TR>
<TD><A HREF="www.yahoo.com">Yahoo</A></TD>
</TR>
</TABLE>
</BODY>
</HTML>
Thanks
Do I need MSXML 4.0 for the <CFOBJECT> tag to worK? Coz I dont have this right now and I am gettign the following error when i try to instantiate a COM object.
Error:
"An exception occurred when instantiating a Com object. The cause of this exception was that: coldfusion.runtime.com.ComObjectInstantiationException: An exception occurred when instantiating a Com object..
The error occurred on line 5. "
Code:
<HTML>
<HEAD>
<TITLE> Test</TITLE>
</HEAD>
<CFOBJECT TYPE="COM" NAME="MyWord" CLASS="WINWORD.EXE" ACTION="Connect" CONTEXT="Local">
<CFSET MyWord.Visible="False">
<CFSET OriginalDoc=MyWord.Documents>
<CFSET OriginalDoc.Open("C:\wwwroot\test.doc")>
<CFSET ConvertedDoc=MyWord.ActiveDocument>
<CFSET ConvertedDoc.SaveAs("C:\wwwroot\Test\test.html",Val(8))>
<CFSET MyWord.Quit()>
<CFSET ReleaseComObject(MyWord)>
<BODY>
<TABLE>
<TR>
<TD><A HREF="www.yahoo.com">Yahoo</A></TD>
</TR>
</TABLE>
</BODY>
</HTML>
Thanks