• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

MSXML 4.0 needed for COM object invocation?

Guest
May 08, 2006 May 08, 2006

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

408

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 08, 2006 May 08, 2006

Copy link to clipboard

Copied

With my novice knowledge ot COM objects, I believe your class should be "Word.Application".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 08, 2006 May 08, 2006

Copy link to clipboard

Copied

Actually, it was that only and the Action was Create when I got the message. I by chance the posted the modified code which I had modified for testing.

Any ideas now?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 08, 2006 May 08, 2006

Copy link to clipboard

Copied

LATEST
Hi,

I installed MSXML 4.0 and now I am getting a slightly different error:
" An exception occurred when instantiating a Com object. The cause of this exception was that: coldfusion.runtime.com.ComProxy$ComObjectConnectionException: An exception occurred when trying to connect to an active Com object.. "

Any Ideas?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation