Kim Gilbert
Member
- Outlook version
- Outlook 2013 64 bit
- Email Account
- Exchange Server
Hi,
The following macro takes mail items and converts them to Outlook tasks for several recipients. The messages are automatically generated from Noreply with the subject "ETM - Manufacturing Request No. XXXX"). The problem is that for some recipients, the macro won't re-enable every time.
Sub ConvertMailtoTask(Item As Outlook.MailItem)
Dim oFolder As Outlook.Folder
Set oFolder = Application.Session.GetDefaultFolder(olFolderTasks)
Set objTask = oFolder.Items.Add("IPM.Task.Task with IR and MR Field")
With objTask
.Subject = Item.Subject
.StartDate = Item.ReceivedTime
.DueDate = #1/1/4501#
Dim newAttachment As Outlook.Attachment
Set newAttachment = objTask.Attachments.Add _
(Item, Outlook.OlAttachmentType.olEmbeddeditem)
.Save
End With
Set objTask = Nothing
End Sub
Thanks so much for y our help!
Kim
The following macro takes mail items and converts them to Outlook tasks for several recipients. The messages are automatically generated from Noreply with the subject "ETM - Manufacturing Request No. XXXX"). The problem is that for some recipients, the macro won't re-enable every time.
Sub ConvertMailtoTask(Item As Outlook.MailItem)
Dim oFolder As Outlook.Folder
Set oFolder = Application.Session.GetDefaultFolder(olFolderTasks)
Set objTask = oFolder.Items.Add("IPM.Task.Task with IR and MR Field")
With objTask
.Subject = Item.Subject
.StartDate = Item.ReceivedTime
.DueDate = #1/1/4501#
Dim newAttachment As Outlook.Attachment
Set newAttachment = objTask.Attachments.Add _
(Item, Outlook.OlAttachmentType.olEmbeddeditem)
.Save
End With
Set objTask = Nothing
End Sub
Thanks so much for y our help!
Kim