I'm trying to use CFOBJECT to convert a Word doc to HTML.  The code
basically works, except that I don't have the right parameter for the "file
type" for the save-as method.  If I remove "HTML" it works fine, but with
"HTML" it breaks.  What should the parameter be?

<cfset file = ...>
<CFOBJECT ACTION="Create" 
     NAME="WordApp"
     CLASS="Word.Application">
         <cfset WordApp.Visible = FALSE>                 
         <cfset WordDoc = WordApp.Documents>
         <cfset success = WordDoc.Open(file & ".doc")>    
         <cfset ActiveDoc = WordApp.ActiveDocument>
         <cfset fileName = "#file#2.htm">

         <!-------- This line below is broken! --------->
         <cfset success = ActiveDoc.SaveAs(fileName, "HTML")>  

         <cfset success = ActiveDoc.Close()>
         <cfset success = WordApp.Quit()>
<cfset WordApp = "">

By the way, I've heard of CFX_Doc2HTML which should do the same thing, but
I wasn't able to obtain a copy, and anyways someone wrote in that it breaks
in 4.5.1.

Thanks in advance,

Gregory M. Saunders, Ph.D.
Senior Design Architect
Cognitive Arts Corporation (http://www.cognitivearts.com)
120 S. Riverside Plaza, Suite 1520
Chicago, IL 60606

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to