无论您是在解决问题还是只是想加快正常使用速度,您都可以利用命令行开关(Command line switches)在Windows 10设备上(Windows 10)的 Microsoft Outlook(basic tasks in Microsoft Outlook)中执行基本任务——我们将在这篇文章中向您展示如何操作。
(Perform Outlook)使用命令行开关(Command Line Switches)执行 Outlook任务
我们看一下Outlook的一些命令行开关,以便开始使用。
按Windows key + R调用“运行”对话框(Run dialog)。
在“运行”(Run)对话框中,您现在可以输入以下命令并按Enter以执行任务。
相关(Related):Microsoft Word 命令行启动开关。
Outlook Compose-line开关发送电子邮件
要撰写新消息,请在“运行”(Run)对话框中输入以下内容:
outlook.exe /c ipm.note
这将生成一个空白的Outlook电子邮件。也可以通过 /m
在命令末尾添加一个额外的开关来添加电子邮件收件人的名称:
outlook.exe /c ipm.note /m [email protected]
结果是一封新的Outlook电子邮件,其中填写了收件人。
您甚至可以通过使用 /a
开关并指定打开电子邮件草稿的磁盘位置来添加附件
outlook.exe /m [email protected] /a "C:\My Documents\May2021Invoice.pdf"
如您所见,该 ipm.note
参数已从命令行开关中排除。除非您指定将文件附加到不同类型项目的说明,否则Outlook将假定用户正在尝试起草电子邮件。
要将内容附加到不同的项目,例如任务(Task),您需要做的就是在命令中添加另一个开关。
阅读:(Read:) 碎片整理选项和命令行开关。
创建其他项目
通过修改用于发送电子邮件的命令中的最后一个元素,您可以创建各种其他Outlook项目。
您可以通过将以下参数添加到命令行开关来做到这一点:
创建新联系人
ipm.contact
创建新笔记
ipm.stickynote
创建一个新任务
ipm.task
创建一个新约会
ipm.appointment
创建一个新的日记帐分录
ipm.activity
阅读:(Read:) 命令行检查磁盘选项、开关、参数(Command Line Check Disk Options, Switches, Parameters)。
清理 Outlook
您还可以使用开关来清理Outlook的某些部分,而无需打开程序。
从自动完成(Autocomplete)注册中删除所有姓名和电子邮件地址:
outlook.exe /cleanautocompletecache
您可以指定以清除Outlook中的某些内容的其他参数/开关如下:
删除任何自定义类别名称并将类别名称恢复为其默认标签。
/cleancategories
删除基于客户端的规则。
/cleanclientrules
删除基于服务器的规则。
/cleanserverrules
删除基于客户端和基于服务器的规则。
/cleanrules
清除并重新生成提醒。
/cleanreminders
删除任何自定义视图并恢复默认值。
/cleanviews
阅读:(Read:) shutdown.exe 的命令行关闭选项(Command-line Shutdown options for shutdown.exe)。
在Outlook中打开和查找文件(Finding Files)
您还可以使用开关在Outlook中打开单个文件,而无需浏览电子邮件收件箱。
以下命令将打开使用MSG格式的消息文件或使用OSS格式的已保存搜索——您只需换出file-name即可。
outlook.exe /f file-name
我们也可以换成 /f
打开 /hol
一个 HOL 文件,并 /ical
打开一个 ICS 文件。
如果您希望获得要查找的内容的文件名,可以使用以下开关:
outlook.exe /finder
这将在 Outlook 中启动高级查找搜索(Advanced Find search in Outlook)。
阅读:(Read:) 使用命令行运行 Microsoft Edge。
使用命令行打开 Outlook
通过利用开关,您还可以打开Outlook并同时执行其他有用的任务。
要在禁用阅读窗格(Reading Pane)的情况下打开Outlook,请使用以下开关:
outlook.exe /nopreview
您可以切换 /nopreview
为 /safe
禁用阅读窗格(Reading Pane)和任何活动的工具栏自定义。
或者,您可以使用以下命令初始化Outlook并打开特定文件夹。
outlook.exe /select folder-name
将文件夹名称(folder-name)占位符替换为特定文件夹的标题或引用,如下所示:
outlook:calendar
为了节省时间,您可以打开Outlook,在收件箱中查找新的会议请求,并使用以下开关将找到的任何内容添加到日历中:
outlook.exe /sniff
如果Outlook 崩溃(Outlook crashes),您可以尝试使用以下开关打开崩溃前处于活动状态的相同配置文件和文件夹:
outlook.exe /restore
最后,如果您想 使用已经打开的Outlook窗口(如果存在)来初始化Outlook ,您可以使用以下命令:(Outlook)
outlook.exe /recycle
这就是您可以用来在Windows 10上的(Windows 10)Outlook中执行基本任务的一些命令行开关!
阅读下一篇:(Read next:) 远程桌面连接的命令行参数(Command Line Parameters for Remote Desktop Connections)。
Outlook Command Line Switches on Windows 10
Whether you’re troubleshooting a problem or just trying to speеd up your normal usage, you can take аdvаntage of Command line switches to carry out basic tasks in Microsoft Outlook on Windows 10 device – we show you how in this post.
Perform Outlook tasks using Command Line Switches
We take a look at a few command-line switches for Outlook to get started with.
Press Windows key + R to invoke the Run dialog.
In the Run dialog box, you can now input the following commands and hit Enter to execute the task.
Related: Microsoft Word Command Line startup switches.
Outlook Compose-line switch to send email
To compose a new message, enter the following into the Run dialog:
outlook.exe /c ipm.note
This will generate a blank Outlook email. It’s also possible to add the name of the email’s recipient by adding an extra /m
switch onto the end of the command:
outlook.exe /c ipm.note /m [email protected]
The result is a new Outlook email with the recipient filled in.
You can even add an attachment by using the /a
switch and specifying its disk location which opens an email draft
outlook.exe /m [email protected] /a "C:\My Documents\May2021Invoice.pdf"
As you can see, the ipm.note
parameter was excluded from the command line switch. Unless you specify the instructions to attach the file to a different type of item, Outlook will assume that the user is trying to draft an email.
To attach content to a different item, such as a Task, all you need to do is add another switch to the command.
Read: Defrag Options & Command line switches.
Creating Other Items
By modifying the last element in the command used to send an email, you can create a variety of other Outlook items.
You can do so by adding the following parameters to the command line switch:
Creates a new contact
ipm.contact
Creates a new note
ipm.stickynote
Creates a new task
ipm.task
Creates a new appointment
ipm.appointment
Creates a new journal entry
ipm.activity
Read: Command Line Check Disk Options, Switches, Parameters.
Cleaning up Outlook
You can use switches also to clean up some parts of Outlook without opening the program.
Remove all names and email addresses from the Autocomplete register:
outlook.exe /cleanautocompletecache
Other parameters/switches that you can specify to clean certain things in Outlook are as follows:
Deletes any custom category names and restores category names to their default labels.
/cleancategories
Deletes client-based rules.
/cleanclientrules
Deletes server-based rules.
/cleanserverrules
Deletes both client-based and server-based rules.
/cleanrules
Clears and regenerates reminders.
/cleanreminders
Deletes any custom views and restores the defaults.
/cleanviews
Read: Command-line Shutdown options for shutdown.exe.
Opening and Finding Files in Outlook
You can also use switches to open individual files in Outlook without having to navigate through an email inbox.
The following command will open either a message file using the MSG format or a saved search that uses the OSS format – you just need to swap out file-name.
outlook.exe /f file-name
We can also swap out /f
for /hol
to open a HOL file, and /ical
to open an ICS file.
In cases where you wangt to have the file name of the content that you’re looking for, you can use the following switch:
outlook.exe /finder
This will launch the Advanced Find search in Outlook.
Read: Run Microsoft Edge using Command line.
Opening Outlook using command-line
By taking advantage of switches, you can also open Outlook and perform other useful tasks at the same time.
To open up Outlook with the Reading Pane disabled, use the following switch:
outlook.exe /nopreview
You can switch out /nopreview
for /safe
to disable both the Reading Pane and any active toolbar customizations.
Alternatively, you can initialize Outlook and open a specific folder by using the following command.
outlook.exe /select folder-name
Replace folder-name placeholder with the title of a particular folder or reference like the following:
outlook:calendar
To save time, you can open Outlook, look for new meeting requests in the inbox and adds anything it finds to the calendar by using the following switch:
outlook.exe /sniff
If Outlook crashes, you can attempt to open the same profile and folders that were active before the crash using the following switch:
outlook.exe /restore
Finally, if you want to initialize Outlook by using an Outlook window that’s already open (if one exists), you can use this command:
outlook.exe /recycle
That’s it on some of the command line switches you can use to perform basic tasks in Outlook on Windows 10!
Read next: Command Line Parameters for Remote Desktop Connections.