0 Replies Latest reply on May 9, 2006 7:01 AM by

    Element DOCUMENTS is undefined in MYWORD


      I have one Coldfusion page which consists of the following code only:
      <TITLE> Test</TITLE>

      <CFOBJECT TYPE="COM" NAME="MyWord" CLASS="Word.Application" ACTION="CONNECT" CONTEXT="Local">
      <H2> cONNECTION fALIED></H2>


      <CFSET MyWord.Visible="False">
      <CFSET OriginalDoc=MyWord.Documents>
      <CFSET OriginalDoc.Open("C:\CFusionMX7\wwwroot\TestPmud\test.doc")>
      <CFSET ConvertedDoc=MyWord.ActiveDocument>
      <CFSET ConvertedDoc.SaveAs("C:\CFusionMX7\wwwroot\TestPmud\test.htm",Val(8))>

      <CFSET MyWord.Quit()>
      <CFSET ReleaseComObject(MyWord)>

      <TD><A HREF="www.yahoo.com">Yahoo</A></TD>

      But on runnning this code from IE , i get the following error:

      Your browser is: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)
      You were trying to process /testME.cfm
      The 'QUERY STRING' was:
      The specific error was: Element DOCUMENTS is undefined in MYWORD.
      The error occurred on line 17.

      I have Coldfusion MX7 installed on Windows Server 2003 and am running IE 6.0 .

      Please help.