创建 Outlook 宏/自动填充提示

创建 Outlook 宏/自动填充提示

我想为我在 Outlook 中发送的常见消息创建自动填充提示。基本上,我希望它的格式如下:

亲爱的 [姓名],

感谢您咨询 [产品]。请致电 [电话号码]。

理想情况下,我希望能够通过按钮、宏或签名选择此消息,并获取括号中每个字段的弹出提示。有人知道如何做这样的事情吗?或者有软件可以帮助我实现这一点吗?

答案1

创建带有自己按钮的电子邮件宏 2012 年 3 月 12 日

我之前曾谈到过如何创建 Outlook 2010 电子邮件模板,但为什么不创建一个宏来进一步加快速度呢?然后,将您的新宏添加到顶部的快速启动栏,然后将其保存在那里!注意:在 Outlook 中录制宏的唯一方法是用 VBA 编写代码,但不要因此而感到害怕。您可以做到!

您需要做的第一件事是启用该流程:

Press the File button next to the Home tab and choose Options.
Select the section Customize Ribbon.
In the right pane, enable the selection field before “Developer”.
Press OK to close the open dialog.

接下来,创建一个新的电子邮件模板:

On the Home tab click  New E-mail 
Customize your email as required with recipients, subject, etc.
Click File and then Save As 
Edit File Name (e.g. MyTemplate) and change Save as Type to Outlook Template (.oft) 
Click Save. (By default file is saved in C:\Documents and Settings\<username>\Application Data\Microsoft\Templates)

现在创建宏:

On the Developer tab click Macros.
Type in a Macro Name (e.g. MyTemplate) and click Create.
A VBA screen opens, with the cursor in between Sub and End Sub. Copy the following text in this space:

    Set msg = Application.CreateItemFromTemplate("C:\Documents and Settings\<username>\Application Data\Microsoft\Templates\MyTemplate.oft")
    msg.Display

The full text in the macro should now look like this (obviously with path and file name amended to contain your username and the name of the template):

    Sub MyTemplate()
    Set msg = Application.CreateItemFromTemplate("C:\Documents and Settings\<username>\Application Data\Microsoft\Templates\MyTemplate.oft")
    msg.Display
    End Sub

在顶部创建一个快速访问按钮来打开您的模板:

Click the little down arrow on the right side of the Quick Access toolbar (above the ribbon on the left) and choose More Commands.
In the drop down list “Choose commands from” select: Macros.

        The list below will now show all of your macros.

Select the macro that you wish to create a button for and press the Add >> button.
To modify the name and icon press the Modify button.
Close the Editor Options dialog.

相关内容