如何使用命令提示符在 ms word 2003 中保存文档?

发布于 2024-08-17 13:00:24 字数 122 浏览 0 评论 0原文

请帮忙,如何使用命令提示符在 ms word 2003 中保存文档? 我对cmd唯一了解的是创建一个目录(mkdir),打开ms word(win word),并将rar文件隐藏为jpeg文件。并将文件从一个目录移动到另一个目录。

Please help, How to save a document in ms word 2003 using command prompt?
The only thing I know about cmd is making a directory(mkdir), open ms word(win word), and hide rar files to jpeg files. And moving files from 1 directory to another.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疏忽 2024-08-24 13:00:24

您可以从命令提示符打开 Word 文档(启动新的 Word 进程),但没有简单的方法可以通过简单的命令行脚本将任何命令发送到正在运行的 Word 实例。例如,如果您想以编程方式保存 Word 文档,您可以使用 VBA(“宏”)或 VBScript。但如果您之前以编程方式更改 Word 文档会更有意义,因此我建议您首先熟悉 VBA。

You can open Word document from the command prompt (starting a new Word process), but there is no easy way of sending any commands to a runnning instance of Word by a simple command line script. If you want to save Word documents programmatically, you can, for example, use VBA ("macros") or VBScript for it. But it would make much more sense if you change the Word document programmatically before, so I suggest that you first make yourself comfortable with VBA.

三生殊途 2024-08-24 13:00:24

AFAIK 没有直接的方法将命令从命令行发送到单词 UI。您必须在这里使用一个工具或技巧:

如果您想转换数据(例如使用命令行打开 txt 或 html 文件)并使用自动启动宏将其另存为 doc 文件,那么使用自动启动宏就足够了。它甚至可以在该自动启动宏中再次关闭单词。
另一种可能性是一种 Win-GUI 记录器,例如 AutoIT。这可以创建包含脚本的脚本或exe,该脚本记录了您之前自己展示过的一些操作(以及更多)。请访问 http://www.autoitscript.com/autoit3/ 查看他们的页面。
第三种可能性是Word 的ActiveX-IF,任何编程系统(甚至AutoIT)都可以访问它。

来自德国的问候!

卢尔

AFAIK there's no direct way to send a command from command line to words UI. You have to imploy a tool or trick here:

Using an autostart macro was sufficient if you want to convert data like opening a txt or html file with the command line and save it as a doc file with the autostart macro. It may even work to shut word down again within that autostart macro.
Another possibility is a kind of Win-GUI-recorder like AutoIT. This can create scripts or exes containing a script that record some actions you have previously shown it yourself (and much much more). Take a look at their pages at http://www.autoitscript.com/autoit3/.
And a third possibility is Word's ActiveX-IF that can be acessed by any programming system (even AutoIT).

Greetings from Germany!

LuI

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文