Click to See Complete Forum and Search --> : Word to html


ranjit
January 21st, 2000, 06:56 AM
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.

Lothar Haensler
January 21st, 2000, 08:49 AM
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)

ranjit
January 23rd, 2000, 09:54 AM
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

February 7th, 2000, 10:02 AM
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