문제

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(

도움이 되었습니까?

해결책

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.

다른 팁

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")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top