By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,052 Members | 1,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,052 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 ###################
'################################################# #######
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.