D
David Parker
Using Outlook 2003 I've got the below macro working in order to give myself
a "start work on task" option in the task window. What I'd like to do is
increment the "actual work" field on the task by the duration of the journal
entry once the journal entry has been saved and closed. Is there any way to
do this and could anyone offer me a pointer how? Or maybe someone else has
already done this.
Sub DaveStartWorkOnTask()
Dim objTask As Outlook.TaskItem
Dim objJi As Outlook.JournalItem
If Application.ActiveInspector.CurrentItem.Class = olTask Then
Set objTask = Application.ActiveInspector.CurrentItem
Set objJi = Application.CreateItem(olJournalItem)
With objJi
.Display
.Sensitivity = objTask.Sensitivity
.Type = "Task"
.Subject = objTask.Subject
.Attachments.Add objTask, olTask
' Copy categories and contacts
Dim objLink As Link
For Each objLink In objTask.Links
.Links.Add objLink.Item
Next objLink
.Categories = objTask.Categories
.Start = Now
.StartTimer
End With
End If
End Sub
a "start work on task" option in the task window. What I'd like to do is
increment the "actual work" field on the task by the duration of the journal
entry once the journal entry has been saved and closed. Is there any way to
do this and could anyone offer me a pointer how? Or maybe someone else has
already done this.
Sub DaveStartWorkOnTask()
Dim objTask As Outlook.TaskItem
Dim objJi As Outlook.JournalItem
If Application.ActiveInspector.CurrentItem.Class = olTask Then
Set objTask = Application.ActiveInspector.CurrentItem
Set objJi = Application.CreateItem(olJournalItem)
With objJi
.Display
.Sensitivity = objTask.Sensitivity
.Type = "Task"
.Subject = objTask.Subject
.Attachments.Add objTask, olTask
' Copy categories and contacts
Dim objLink As Link
For Each objLink In objTask.Links
.Links.Add objLink.Item
Next objLink
.Categories = objTask.Categories
.Start = Now
.StartTimer
End With
End If
End Sub