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.
Printable View
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.
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)
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
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