工作中的某个人问我是否可以实现一个简单的系统,让他根据他可以输入的一些参数发送 Outlook 模板邮件。
一个例子是这样的消息:
"Hello,
Please be informed that system **Parameter1** is current down.
Regards,"
@@parameters@@
我正在考虑在 Outlook VBA 中创建一个表单,该表单将动态查找在某个模板中找到样式为参数(例如)的字符串的次数,然后在表单中为每个找到的参数创建一个编辑框。
问题是我显然想为收件人添加一个框。我需要找到一种方法来调用 Outlook 通讯簿并使其表现得像一个。这不像我希望的那样直观。到目前为止,我只设法做到了以下几点:
Dim snd As Outlook.SelectNamesDialog
Dim displayLL As Boolean
Set snd = Application.Session.GetSelectNamesDialog()
snd.NumberOfRecipientSelectors = Outlook.OlRecipientSelectors.olShowTo
snd.AllowMultipleSelection = True
displayLL = snd.display()
如您所见,这只弹出地址簿并允许我选择几个地址。但是我很难理解我如何才能创建一些实际上就像普通 Outlook 邮件中的“收件人:”和“抄送:”字段一样的字段。