As a follow-up, I checked "Writing Word Macros" (Steven Roman, O'Reilly).
 He lists the possible values of the file format argument of Word's
SaveAs method:

wdFormatDocument = 0
wdFormatTemplate = 1
wdFormatText = 2
wdFormatTextLineBreaks = 3
wdFormatDOSText = 4
wdFormatDOSTextLineBreaks = 5
wdFormatRTF = 6
wdFormatUnicodeText = 7

But there's no entry for HTML.  So I recorded a macro and discovered that
the value for HTML is 100.  Here are the macros for saving as a Word doc
and as HTML.

SaveAs Word Document:

ActiveDocument.SaveAs FileName:="test.doc", FileFormat:=wdFormatDocument,
_
        LockComments:=False, Password:="", AddToRecentFiles:=True,
WritePassword _
        :="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
        SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
        False

SaveAs HTML Document:

ActiveDocument.SaveAs FileName:="test.htm", FileFormat:=100,
LockComments:= _
        False, Password:="", AddToRecentFiles:=True, WritePassword:="", _
        ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
        SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
        False

(So I'm not sure whether val("10") works.)

-David 

On Wed, 19 Apr 2000 14:21:55 -0700 David Shadovitz <[EMAIL PROTECTED]>
writes:
> Back in September, David Crawford wrote that he did exactly this, 
> using
>    mydoc2.SaveAs("d:\temp\htmltest.htm",val("10")) ;
> 
> -David
> 
> Greg Saunders <[EMAIL PROTECTED]> writes:
> > 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 success = ActiveDoc.SaveAs(fileName, "HTML")>  
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
------------------------------------------------------------------------------
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