S
S. Sarman
Hello NG
I am trying to create a task from an own mad message form in VB Script.
Under VBA I used following code:
Sub CreateTaskFromMail()
Dim myTask As TaskItem
Dim myFolder As Folders
Dim myNameSpace As NameSpace
Set myNameSpace = Application.GetNamespace("MAPI")
Set myTask = Application.CreateItem(olTaskItem)
myTask.Subject = ActiveInspector.CurrentItem.Subject
myTask.Body = ActiveInspector.CurrentItem.Body
myTask.Categories = "Mitteilung"
myTask.Importance = ActiveInspector.CurrentItem.Importance
myTask.DueDate = Now()
myTask.StartDate = Now()
myTask.Save
Set myTask = Nothing
End Sub
Under VB Script this code doesn't run. What's wrong? Can anybody help me?
Thanks
Sandor
I am trying to create a task from an own mad message form in VB Script.
Under VBA I used following code:
Sub CreateTaskFromMail()
Dim myTask As TaskItem
Dim myFolder As Folders
Dim myNameSpace As NameSpace
Set myNameSpace = Application.GetNamespace("MAPI")
Set myTask = Application.CreateItem(olTaskItem)
myTask.Subject = ActiveInspector.CurrentItem.Subject
myTask.Body = ActiveInspector.CurrentItem.Body
myTask.Categories = "Mitteilung"
myTask.Importance = ActiveInspector.CurrentItem.Importance
myTask.DueDate = Now()
myTask.StartDate = Now()
myTask.Save
Set myTask = Nothing
End Sub
Under VB Script this code doesn't run. What's wrong? Can anybody help me?
Thanks
Sandor