macOS 实现 DOC 批量转 DOCX

温馨提示:本文最后更新于2024-10-12 15:54:51,某些文章具有时效性,若有错误或已失效,请在下方留言

本文主要利用 macOS 的 自动操作 以及 AppleScript 来实现 DOC 批量转 DOCX。

DOC 转 DOCX

AppleScript 的运行脚本

on run {input, parameters}
    tell application "Microsoft Word"
        repeat with docFile in input
            if (name extension of (info for docFile)) is "doc" then
                open file (POSIX path of docFile)
                set outputFilePath to (text 1 thru -5 of (POSIX path of docFile)) & ".docx"
                save as active document file name outputFilePath file format format document
                close active document saving no
            end if
        end repeat
    end tell
    return input
end run

THE END
喜欢就支持一下吧
点赞12赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容