从命令行使用其他数据源参数打开Word文档 [英] Open Word document from command line with additional data source parameter
本文介绍了从命令行使用其他数据源参数打开Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以使用以下命令从命令行打开Word文档:
It is possible to open a word document from the command line using this:
rundll32 url.dll,FileProtocolHandler path.to.word.document.doc
不幸的是,该文档需要外部数据源,因此一旦打开该数据源,就必须手动设置其路径.
Unfortunately, that document needs an external data source, so the path of that data source has to be set manually once it is opened.
是否有更方便的方法来提供附加参数以指向数据源?
Is there a more convenient way to provide an additional parameter to point to the data source?
推荐答案
您可以使用
winword.exe <filepath>
要在命令提示符下使用winword,您需要这样设置路径变量
To use winword in command prompt you need to set your path variable like this
set path=%path%;C:\Program Files\Microsoft Office\Office14
这篇关于从命令行使用其他数据源参数打开Word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文