Good afternoon, all,
I have been fighting with the CFSCRIPT below for hours. I have scoured the
Internet for help and haven't found a solution.
I found a CFSCRIPT to convert a Word document to HTML in cfcomet.com. The
code works fine with some modification, to a point. The problem comes when
I try to save as HTML. I have checked the server and the fileconverter for
HTML Document is saveformat 10 (why couldn't MS have made the file converter
codes standard on all machines???). I can save the file as a Word document
with another name, but I cannot use SaveAs. Here is the code:
****BEGIN CODE SNIPPET******
/* This will not open Word if running locally */
objApp.Visible = FALSE;
/* This returns the 'Documents' collection of the Word object */
objDocs = objApp.Documents;
/* Open the document to be converted */
objDocs.Open(tfpath&docFileName);
/* set a reference to the opened document*/
objDoc = objApp.ActiveDocument;
/* save as HTML */
objDoc.SaveAs(tfpath&newFileName,10);
****END CODE SNIPPET******
Through the use of the WriteOutput command, I know
that the code is failing on the SaveAs command.
The error I am getting is
Error on Invoke for:
COM error 0x80020005. Type mismatch.
The error occurred while processing an element with a general
identifier of (CFSCRIPT)
Any ideas???
Kathryn
I have been fighting with the CFSCRIPT below for hours. I have scoured the
Internet for help and haven't found a solution.
I found a CFSCRIPT to convert a Word document to HTML in cfcomet.com. The
code works fine with some modification, to a point. The problem comes when
I try to save as HTML. I have checked the server and the fileconverter for
HTML Document is saveformat 10 (why couldn't MS have made the file converter
codes standard on all machines???). I can save the file as a Word document
with another name, but I cannot use SaveAs. Here is the code:
****BEGIN CODE SNIPPET******
/* This will not open Word if running locally */
objApp.Visible = FALSE;
/* This returns the 'Documents' collection of the Word object */
objDocs = objApp.Documents;
/* Open the document to be converted */
objDocs.Open(tfpath&docFileName);
/* set a reference to the opened document*/
objDoc = objApp.ActiveDocument;
/* save as HTML */
objDoc.SaveAs(tfpath&newFileName,10);
****END CODE SNIPPET******
Through the use of the WriteOutput command, I know
that the code is failing on the SaveAs command.
The error I am getting is
Error on Invoke for:
COM error 0x80020005. Type mismatch.
The error occurred while processing an element with a general
identifier of (CFSCRIPT)
Any ideas???
Kathryn