【发布时间】:2016-02-28 23:44:14
【问题描述】:
我正在尝试在 Excel 中创建服务台工具,而我想让管理员轻松分配它们的方式是使用 Outlook 中的任务。
管理员将收到电子邮件,在 Excel 中填写一行,然后单击一个按钮在 Outlook 中打开一个新任务,并预先填写字段。然后他们会将电子邮件作为附件拖放。
但是,我正在尝试从电子表格中的值预填充分配给电子邮件地址。分配似乎不起作用,收件人也不起作用。有没有人有任何想法为什么不?这是我到目前为止的代码:
Dim OutApp As Outlook.Application
Dim OutTask As Outlook.TaskItem
Set OutApp = CreateObject("Outlook.Application")
Set OutTask = OutApp.CreateItem(olTaskItem)
With OutTask
.Assign = Cells(2, "G")
.Subject = "Service Request" & Cells(2, "A")
.StartDate = Cells(2, "H")
.DueDate = Cells(2, "H") + Cells(2, "I")
.ReminderTime = .DueDate - 1
.Body = "Please see the attached email for a service request assigned to you."
.Display
End With
Set OutTsk = Nothing
Set OutApp = Nothing
End Sub
任何帮助将不胜感激!
【问题讨论】: