Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP / VB - Save Word file to "filtered" HTML

Reply
Thread Tools

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

 
 
COMantilles
Guest
Posts: n/a
 
      09-13-2003
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 ###################
'################################################# #######


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save and then display msword documents as html, filtered html, single file .mht or pdf. AAaron123 ASP .Net 1 11-17-2009 10:02 AM
how to save the out html to a html file on server disk automatically ? sincethe2003 ASP .Net 2 07-14-2004 05:18 PM
cannot save or save as in word Phil Edwards Computer Support 0 07-12-2004 07:01 AM
word will not save or save as Alex B Computer Support 5 07-10-2004 05:23 AM
How do I identify word<html><html>other word? Laura Perl 1 06-04-2004 11:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57