I also am working on this action. To create tasks from emails. After
running google I found a macro to accomplish this in microsoft blogs.
I have pasted the code into ThisOutLookSession and saved as project
one. The problem I am having is creating a button on the toolbar to
run the macro. When I go to view/tools/customize and the options tab
and choose macros, my saved project1 does not show in the command
window to drag up to the tool bar for creation. Any insight on this
would be helpful. The following is the code I found:
Dim olTask As Outlook.TaskItem
'Using object rather than MailItem, so that it
'can handle posts, meeting requests, etc as well
Dim olItem As Object
Dim olExp As Outlook.Explorer
Dim fldCurrent As Outlook.MAPIFolder
Dim olApp As Outlook.Application
Set olApp = Outlook.CreateObject("Outlook.Application")
Set olTask = olApp.CreateItem(olTaskItem)
Set olExp = olApp.ActiveExplorer
Set fldCurrent = olExp.CurrentFolder
Dim cntSelection As Integer
cntSelection = olExp.Selection.Count
For i = 1 To cntSelection
Set olItem = olExp.Selection.Item(i)
olTask.Attachments.Add olItem
olTask.Subject = "Follow up on " & olItem.Subject
olItem.Delete
Next
olTask.Display
'Set the due date for today
olTask.DueDate = Date
'Set the reminder for 3 hours from now
olTask.ReminderSet = True
olTask.ReminderTime = DateAdd("h", 3, Now)
'Saving the task item, so that in case I close it, I won't lose
'the items which were deleted after being attached to the task
olTask.Save
End Sub
livingthedream