CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Word to html

  1. #1
    Join Date
    Jun 1999
    Location
    Pune, Maharastra, India
    Posts
    59

    Word to html

    I want to read a Word File a convert it to HTML Document how to do this DO I Use OLE automation ie i have to implement Saveas HTML Code thorugh VB. Can some one help me out on this.




  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Word to html

    add a reference to the Word typelib to your vb project

    Dim w as Word.Application
    set w = new Word.Application
    w.Documents.Open ("c:\test.txt")
    w.ActiveDocument.SaveAs FileName:="c:\tesx.htm", _
    FileFormat:=wdFormatHTML
    set w = nothing



    (tested in Vb6, Word2000, NT 4)


  3. #3
    Join Date
    Jun 1999
    Location
    Pune, Maharastra, India
    Posts
    59

    Re: Word to html

    The application that i wish to create will not relly on word's objects it will do the actual conversion of word file to doc and it will not use save as code atall it is an assignment of sorts that has been given and has been taken up as a challenge so can U tell me some thing more please

    Ranjit


  4. #4
    Guest

    Re: Word to html

    Word files can be read by script code just by loading the doc file in a window such as location.href=something.doc and Word will load the doc file in the assigned window


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured