ASP / VB - Save Word file to "filtered" HTML

C

COMantilles

Hi,

Hi created a simple function to open a word doc on server then save it to
HTML, ok for the result except that i would like to save it to "filtered"
HTML without office's tags (word 2002 function).

It might be only the number at the end of this command line to change, but
wich is right ?
objWord.Application.ActiveDocument.SaveAs strHTMLDoc, 8

Here's the code, any help much appreciated !

'########################################################
'############### CONVERT WORD TO HTML ###################
Function WordToHTML(strWordDoc,strHTMLDoc)

On Error Resume Next

Set objWord = CreateObject("Word.Application")
objWord.Visible = False
objWord.Documents.Open(strWordDoc)

objWord.Application.ActiveDocument.SaveAs strHTMLDoc, 8

objWord.Documents.Close
objWord.quit
Set objWord = Nothing

IF Err.Number > 0 Then
Err.Raise 6 ' Raise an overflow error.
Response.Write "Error # " & CStr(Err.Number) & " " & Err.Description
Err.Clear ' Clear the error.
End IF

End Function
'############### CONVERT WORD TO HTML ###################
'########################################################
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top