我正在开发Access中的任务提醒,以提醒相关员工关键的应得任务。
我有一个表,其中包含有关到期日期的详细信息,并且我希望将任务设置给特定记录的特定员工。
我可以将任务设置为我的Outlook。是否可以将任务设置为其他用户的Outlook?
我希望在不设置代理或共享文件夹的情况下完成此任务。
Dim outLookApp As Outlook.Application
Dim outlookTask As Outlook.TaskItem
Dim myDelegate As Outlook.Recipient
Set outLookApp = CreateObject("outlook.application")
Set outlookTask = outLookApp.createitem(olTaskItem)
With outlookTaskoutlookTask.To = Me.Text33
.Subject = "Contract Expiry With In Month Of:" & Space(2) &Forms!frmrem!EmpName.Value
.body = "EmployeeName:" & Space(2) & Forms!frmrem!EmpName.Value
.reminderset = True
.duedate = Me.DOJ
.ReminderTime = Me.DOJ - 30 & " 8:00 AM"
.reminderplaysound = True
.Save
End With
MsgBox "Successfully task has been set ", vbInformation, "Set task Confirmd"
End Sub 发布于 2017-09-05 02:20:46
你可以assign a task,接收者可以接受。
这方面的VBA代码可以在TaskItem.Assign Method (Outlook)中找到。
Sub AssignTask()
Dim myItem As TaskItem
Dim myTaskAssignee As Recipient
Set MyItem = CreateItem(olTaskItem)
MyItem.Assign
Set myTaskAssignee = MyItem.Recipients.Add("Dan Wilson")
myTaskAssignee.Resolve
If myTaskAssignee.Resolved Then
myItem.Subject = "Prepare Agenda For Meeting"
myItem.DueDate = Now + 30
myItem.Display
myItem.Send
End If
ExitRoutine:
Set MyItem = Nothing
Set myTaskAssignee = Nothing
End Subhttps://stackoverflow.com/questions/45779823
复制相似问题