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. Advertisements

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:
    696
    Gunnar Hjalmarsson
    Jun 5, 2004
  2. Simon Gorski

    save filtered dataset

    Simon Gorski, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    395
    Simon Gorski
    Jan 19, 2004
  3. sincethe2003
    Replies:
    2
    Views:
    666
    Craig Deelsnyder
    Jul 14, 2004
  4. Al Moritz
    Replies:
    7
    Views:
    906
    Richard Laing
    Jul 22, 2003
  5. fitwell
    Replies:
    2
    Views:
    726
    fitwell
    Nov 13, 2003
  6. AAaron123
    Replies:
    1
    Views:
    1,298
    Alexey Smirnov
    Nov 17, 2009
  7. Nick Sabalausky

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

    Nick Sabalausky, Feb 9, 2010, in forum: Ruby
    Replies:
    11
    Views:
    392
    Nick Sabalausky
    Mar 3, 2010
  8. Shahar Golan
    Replies:
    5
    Views:
    452
    kaeli
    Oct 16, 2003
Loading...