Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Word SaveAs HTML

 Keywords: OLE Word SaveAs HTML 

Sample code:

This uses Word to convert doc files to html. Great for users who need to post to the web but don't know html.

Just substitute file with full path to doc file and new file with full path to html file.

file = "c:\temp\my.doc"
newfile = "c:\temp\my.html"
App = ObjectOpen("Word.Application")
Docs = App.Documents
Doc = Docs.Open(file)
Doc.SaveAs(newfile,2)
Doc.Close()
App.Quit()

ObjectClose(Doc)
ObjectClose(Docs)
ObjectClose(App)



Article ID:   W14703
Filename:   Word SaveAs HTML.txt