Question

as i see, There is no way to convert .doc files to .htm, "convert format of Word documents" in automator, no save as .htm, and for applescript word functions

i didn't see it too(

Was it helpful?

Solution

You can do it in AppleScript:

tell application "Microsoft Word"
    save as active document file name "converted.html" file format format HTML
end tell

The file name should be a path to wherever you want it created using old-style Mac paths, e.g. Macintosh HD:Users:somebody:Desktop:converted.html.

OTHER TIPS

Yes. The unix command line utility "textutil" can do it. Something like this. Notice that since you're converting to html we can use the command line utility "tidy" to clean up the html code before writing to a file.

set docFile to choose file
do shell script "/usr/bin/textutil -stdout -format doc -convert html " & quoted form of POSIX path of docFile & " | /usr/bin/tidy -ib -utf8 -output " & quoted form of POSIX path of ((docFile as text) & ".html")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top