Here is a little sample that calls a function each time a new e-mail is
coming in (there may be expectings). The method "CreateTaskFromMail" is
almost still empty. What kind of data do you like to use for the task?
'<DieseOutlookSitzung>
Private WithEvents m_oItems As Outlook.Items
Private Sub Application_Startup()
Set m_oItems =
Application.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub m_oItems_ItemAdd(ByVal Item As Object)
If TypeOf Item Is Outlook.MailItem Then
CreateTaskFromMail Item
End If
End Sub
Public Sub CreateTaskFromMail(oMail As Outlook.MailItem)
Dim oTask As Outlook.TaskItem
Set oTask = Application.CreateItem(olTaskItem)
With oTask
.Subject = oMail.Subject
.Save
End With
End Sub
'</DieseOutlookSitzung>
This a call center and some problem are escalated because agents are not
available. I would like to take the subject line a of a particular message
from a specific mailbox (TM-099-PSST Escalations) and create the Task. I will
try to write this from the sample you sent. If you can think of anything else
please let me know.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.