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

Discussion in 'ASP .Net' started by COMantilles, Sep 13, 2003.

  1. COMantilles

    COMantilles Guest

    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 ###################
    '########################################################
    COMantilles, Sep 13, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laura
    Replies:
    1
    Views:
    526
    Gunnar Hjalmarsson
    Jun 5, 2004
  2. vMike
    Replies:
    1
    Views:
    480
    Natty Gur
    Aug 26, 2003
  3. Simon Gorski

    save filtered dataset

    Simon Gorski, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    333
    Simon Gorski
    Jan 19, 2004
  4. AAaron123
    Replies:
    1
    Views:
    998
    Alexey Smirnov
    Nov 17, 2009
  5. Nick Sabalausky

    Here's a filtered file/dir copy, FWIW.

    Nick Sabalausky, Feb 9, 2010, in forum: Ruby
    Replies:
    11
    Views:
    228
    Nick Sabalausky
    Mar 3, 2010
Loading...

Share This Page