WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Word

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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)
wdFormatFilteredHTML = 10
Doc.SaveAs(newfile,wdFormatFilteredHTML)
Doc.Close()
App.Quit()

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



Article ID:   W14703
Filename:   Word SaveAs HTML.txt
File Created: 2005:07:15:09:17:26
Last Updated: 2005:07:15:09:17:26