启动命令提示符作用_如何(为什么)从命令提示符下启动Microsoft Word

启动命令提示符作用

启动命令提示符作用

word logo

Like most apps, you can launch Word from the Command Prompt, but Word also supports several optional switches for controlling the startup process.

与大多数应用程序一样,您可以从命令提示符启动Word,但是Word还支持几个可选的开关来控制启动过程。

Whether you type the command at the prompt, use it to create a shortcut, insert it as part of a batch script, launching Word with additional parameters lets you do things like start Word in Safe Mode for troubleshooting or start with a specific template.

无论您是否在提示符下键入命令,使用它创建快捷方式 ,将其作为批处理脚本的一部分插入,使用其他参数启动Word,都可以执行诸如在安全模式下启动Word进行故障排除之类的操作或从特定模板开始。

使用命令提示符启动Word (Using the Command Prompt to Start Word)

Before we can open Word using the Command Prompt, we need to figure out which directory the winword.exe file is located. You can do this manually, or you can just have the Command Prompt find it for you. To do this, go ahead and open the Command Prompt by opening the start menu and typing “cmd” and selecting the “Command Prompt” application.

在使用命令提示符打开Word之前,我们需要确定winword.exe文件位于哪个目录。 您可以手动执行此操作,也可以只让命令提示符为您找到它。 为此,请继续并通过打开开始菜单并键入“ cmd”并选择“命令提示符”应用程序来打开命令提示符。

Open Command Prompt in Start Menu

When you open the Command Prompt, you’ll be in the top tier directory—your user account folder. We need to dig deeper by going into the Program Files directory. Do so by entering the following command and then pressing Enter:

当您打开命令提示符时,您将位于顶层目录中-您的用户帐户文件夹。 我们需要进入Program Files目录进行更深入的研究。 为此,请输入以下命令,然后按Enter:

cd\”program files (x86)”

cd \“程序文件(x86)”

Program Files in Command Prompt

You’ll now be in the Program Files directory. The next step is to locate the directory where the winword.exe file is located. Do so by typing the following command and pressing “Enter.”

您现在将位于Program Files目录中。 下一步是找到winword.exe文件所在的目录。 为此,请键入以下命令并按“ Enter”。

dir winword.exe /s

dir winword.exe / s

Once you enter this command, the Command Prompt will locate the directory for you.

输入此命令后,命令提示符将为您找到目录。

Winword directory

Now that you know the directory where the winword.exe file is located, you can use the cd command to open the file path. In this example, you would need to enter the following command:

现在您已经知道winword.exe文件所在的目录,您可以使用cd命令打开文件路径。 在此示例中,您将需要输入以下命令:

cd Microsoft Office\root\Office16

cd Microsoft Office \ root \ Office16

Now you should be in the directory where winword.exe is located.

现在,您应该在winword.exe所在的目录中。

Open Winword file

Now, if you want to open Microsoft Word the same way as if you were opening it via its icon, all you must do is type winword and then press “Enter,” and Word will open its usual way.

现在,如果要像通过其图标打开Microsoft Word一样打开Microsoft Word,您所要做的就是键入winword ,然后按“ Enter”,Word将以其通常的方式打开。

Open Normal Word

However, the whole point of using the command is that you can use the different switches and parameters it offers.

但是,使用该命令的重点是可以使用它提供的不同开关和参数。

常用Word命令行开关和参数 (Common Word Command Line Switches and Parameters)

Borrowed from the official Microsoft Office support site, here is a list of some possible ways to open Word, along with its respective command.

Microsoft Office官方支持网站借来的,这里列出了一些打开Word的可能方法以及其相应的命令。

Switch and ParameterDescription
/safeStarts Word in Safe Mode. This launches Word without any additional add-ins, templates, and other customizations. It’s helpful when troubleshooting problems in Word.

You can also launch Word in Safe Mode by holding down the Ctrl key while launching Word from the Start menu, creating a shortcut with this parameter makes it that much easier.

/qStarts Word without displaying the Word Splash screen.
/ttemplatenameStarts Word with a new document based on a template other than the Normal template.

Example: Assume we wanted to open a document stored on the C drive called example.docx, we’d type the following command:

/tc:\example.docx

Note: Do not put a space between the switch and the name of the file.

/t filenameStarts Word and opens an existing file.

Example: To start Word and open the existing file example.docx, stored on the C drive, enter the following:

/t c:\example.docx

To open multiple files, example.docx and example2.docx, located in the C drive at once, enter the following:

/t c:\example.docx c:\example2.docx

/f filenameStarts Word with a new document based on an existing file.

Example: To start Word and create a new document based on file example.docx, stored on the desktop, enter the following:

/f “c:\Documents and Settings\All Users\Desktop\example.docx

/h http://filenameStarts Word and opens a read-only copy of a document that is stored on a Microsoft Windows SharePoint Services site. The site must be on a computer that is running Word 2007 or later or Windows SharePoint Services 2.0 or later.

Example: To start Word and open a copy of a file example.docx, stored in a document library at the URL http://MySite/Documents, enter the following:

/h http://MySite/Documents/example.docx

Note: If the document is checked out to you, the /h switch has no effect. Word opens the files so that you can edit it.

/pxsltStarts Word and opens an existing XML document based on the specified XSLT.

Example: To start and apply the XSLT MyTransform, stored on the C drive, enter the following:

/pc:\MyTransform.xsl c:\Data.sml

/aStarts Word and prevents add-ins and global templates (including the Normal template) from being loaded automatically. The /a switch also locks the settings files.
/ladd-inStarts Word and then loads a specific Word add-in.

Example: To start Word and load the add-in Sales.dll, stored on the C drive, enter the following:

/ic:\Sales.dll

Note: Do not include a space between the switch and the add-in name.

/mStarts Word without running any AutoExec macros.
/mmacronameStarts Word and the runs a specific macro. The m/ switch also prevents word from running any AutoExec macros.

Example: To start Word and then run the macro Salelead, enter the following:

/mSalelead

Note: Do not include a space between the switch and the macro name.

/nStarts a new instance of Word with no document open. Documents opened in each instance of Word will not appear as choices in the Switch Windows list of other instances.
/wStarts a new instance of Word with a blank document. Documents opened in each instance of Word will not appear as choices in the Switch Windows list of other instances.
/rRe-register Word in the Windows registry. This switch starts Word, runs Office Setup, updates the Windows registry, and the closes.
/xStarts Word from the operating system shell so that Word responds to only one DDE request (for example, to print a document programmatically).
/ztemplatenameVisibly behaves exactly like the /t switch. However, you can use the /z switch with Word to generate both a Startup and a New event, whereas the /t switch generates only a Startup event.
开关和参数 描述
/安全 以安全模式启动Word 。 这将启动Word,而无需任何其他加载项,模板和其他自定义项。 解决Word中的问题时,这很有用。

您还可以通过以下方式在安全模式下启动Word:在“开始”菜单中启动Word时,按住Ctrl键,使用此参数创建快捷方式将使其变得更加容易。

/ q 启动Word而不显示Word Splash屏幕。
/ ttemplatename 以基于普通模板以外的模板的新文档启动Word。

示例:假设我们要打开存储在C驱动器上的名为example.docx的文档,我们将键入以下命令:

/tc:\example.docx

注意:请勿在开关和文件名之间放置空格。

/ t文件名 启动Word并打开一个现有文件。

示例:要启动Word并打开存储在C驱动器中的现有文件example.docx,请输入以下内容:

/tc:\example.docx

要一次打开C驱动器中的多个文件example.docx和example2.docx,请输入以下内容:

/tc:\example.docx c:\ example2.docx

/ f文件名 使用基于现有文件的新文档启动Word。

示例:要启动Word并基于存储在桌面上的example.docx文件创建一个新文档,请输入以下内容:

/ f“ c:\ Documents and Settings \ All Users \ Desktop \ example.docx

/ h http://文件名 启动Word并打开存储在Microsoft Windows SharePoint Services网站上的文档的只读副本。 该站点必须位于运行Word 2007或更高版本或Windows SharePoint Services 2.0或更高版本的计算机上。

示例:要启动Word并打开存储在URL http:// MySite / Documents中的文档库中的example.docx文件的副本,请输入以下内容:

/ h http://MySite/Documents/example.docx

注意:如果签出文档给您,/ h开关无效。 Word将打开文件,以便您可以对其进行编辑。

/ pxslt 启动Word并基于指定的XSLT打开现有的XML文档。

示例:要启动并应用存储在C驱动器中的XSLT MyTransform,请输入以下内容:

/pc:\MyTransform.xsl c:\ Data.sml

/一个 启动Word,并阻止加载项和全局模板(包括“普通”模板)自动加载。 / a开关还锁定设置文件。
/ ladd-in 启动Word,然后加载特定的Word加载项。

示例:要启动Word并加载存储在C驱动器中的加载项Sales.dll,请输入以下内容:

/ic:\Sales.dll

注意:开关和外接程序名称之间不要包含空格。

/米 在不运行任何AutoExec宏的情况下启动Word。
/ mmacroname 启动Word并运行特定的宏。 m /开关还可以防止word运行任何AutoExec宏。

示例:要启动Word,然后运行宏Salelead,请输入以下内容:

/ mSalelead

注意:开关和宏名称之间不要包含空格。

/ n 在没有打开文档的情况下启动Word的新实例。 在Word的每个实例中打开的文档不会在其他实例的“切换Windows”列表中显示为选项。
/ w 使用空白文档启动Word的新实例。 在Word的每个实例中打开的文档不会在其他实例的“切换Windows”列表中显示为选项。
/ r 在Windows注册表中重新注册Word。 此开关启动Word,运行Office安装程序,更新Windows注册表,然后关闭。
/X 从操作系统外壳程序启动Word,以便Word仅响应一个DDE请求(例如,以编程方式打印文档)。
/ ztemplatename 看起来与/ t开关完全一样。 但是,可以将/ z开关与Word一起使用以生成Startup和New事件,而/ t开关仅生成Startup事件。

That’s all there is to it! Now you should be able to open Word in any specific way you choose by simply following these commands.

这里的所有都是它的! 现在,您只需遵循以下命令,就可以用您选择的任何特定方式打开Word。

翻译自: https://www.howtogeek.com/366399/how-and-why-to-start-microsoft-word-from-the-command-prompt/

启动命令提示符作用

对网页的便利贴。 网页便笺通过在以下网站上添加便笺来减轻您的记忆:-特定网站-该网站的特定页面-该页面的特定元素-匹配定义范围的任何网页缺点-单击并键入上下文-特定于页面而不是混乱的记事板简单-只需单击两次即可完成直观-浅功能,符号图标,工具提示可填补空白清洁-图标清晰,边框整洁,用途不多-相框,视频嵌入,RSS提要等 。便携式-将笔记同步到Google云端硬盘,并在另一台计算机上访问它们加密-导出/备份/同步已加密***功能***-同步到Google云端硬盘-加密-添加/删除/克隆-最小化/最大化-调整大小/双击边缘以调整大小/自动调整大小-背景/文本/边框颜色+透明度-更改字体属性-移至顶部/发送至底部-导出/导入-范围(全局,域,页面等)-管理所有注释-覆盖默认设置的设置-引脚n注释到另一注释,至下一页-锁定注释-加载媒体-拍摄快照-RSS Feed-纯文本/降价/文本格式-更多... !!!重要!一些人提到了扩展名不起作用的事实。原因之一可能是页面尚未完全加载。仅当进度圈完成并且页面图标显示在选项卡上时,该选项才起作用。有几个人提到以下事实:当重新访问同一页面时,注释不会持续存在。原因之一可能是当您再次尝试访问同一页面时,该页面可能具有不同的URL(即,?之后的URL有所不同)。如果您认为并非如此,请在“支持”选项卡下提供一个示例。该扩展程序在“新建标签”,“扩展程序”或其他Chrome(非网络)页面上也将不起作用。 支持语言:English (United States)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值