Morning folks
Sorry if this problem has been in another thread, but i have not found any.
Im programming an MS Access database that shall be used to handle internal problems in our production.
In short terms, the database shall hold records about the problems and solutions to it - depending on what is decided to do to the problem different persons is assigned the task to solve the preblem.
I have been able to use VBA code to create and submit the task into the responsible persons "Tasks" in outlook as a delegated task.
But when this is done has the person an option to accept the delegation or decline it. And this answer is not sent back to the orginator of the task - Why ?? i can't see the solution to it.
When I create a task and delegate it "manually" in my outlook so do I get the response, but not when the task has been sent by VBA code.
The code that i have is a modificated code fron the MS Help file and looks like this
Function SendTask(TaskRecip As String)
' Test av att skapa en Task i outlook
' Gerth Ericsson 2005-08-09
'
' ************************************************************************
' *
' ************************************************************************
Dim OlApp As Outlook.Application
Dim ObjTask As Outlook.TaskItem
Set OlApp = CreateObject("Outlook.Application")
Set ObjTask = OlApp.CreateItem(olTaskItem)
With ObjTask
.Assign
Set mydelegate = .Recipients.Add("" & TaskRecip & "")
mydelegate.Resolve ' Checks so the person is in our ACtive Directory
If mydelegate.Resolved Then
.Subject = "Subject line for the task"
.Body = "Information what to do"
.StartDate = Now
.DueDate = DateAdd("d", 30, Now)
.ReminderSet = True
.ReminderTime = DateAdd("d", 23, Now)
.Display
.Send
Else
Exit Function
End If
End With
End Function
Or is there a way to assign the task to a person without doing it as an "Delegated task" ?
Thanks in advance for hints.
Regards
Gerth Ericsson
Sorry if this problem has been in another thread, but i have not found any.
Im programming an MS Access database that shall be used to handle internal problems in our production.
In short terms, the database shall hold records about the problems and solutions to it - depending on what is decided to do to the problem different persons is assigned the task to solve the preblem.
I have been able to use VBA code to create and submit the task into the responsible persons "Tasks" in outlook as a delegated task.
But when this is done has the person an option to accept the delegation or decline it. And this answer is not sent back to the orginator of the task - Why ?? i can't see the solution to it.
When I create a task and delegate it "manually" in my outlook so do I get the response, but not when the task has been sent by VBA code.
The code that i have is a modificated code fron the MS Help file and looks like this
Function SendTask(TaskRecip As String)
' Test av att skapa en Task i outlook
' Gerth Ericsson 2005-08-09
'
' ************************************************************************
' *
' ************************************************************************
Dim OlApp As Outlook.Application
Dim ObjTask As Outlook.TaskItem
Set OlApp = CreateObject("Outlook.Application")
Set ObjTask = OlApp.CreateItem(olTaskItem)
With ObjTask
.Assign
Set mydelegate = .Recipients.Add("" & TaskRecip & "")
mydelegate.Resolve ' Checks so the person is in our ACtive Directory
If mydelegate.Resolved Then
.Subject = "Subject line for the task"
.Body = "Information what to do"
.StartDate = Now
.DueDate = DateAdd("d", 30, Now)
.ReminderSet = True
.ReminderTime = DateAdd("d", 23, Now)
.Display
.Send
Else
Exit Function
End If
End With
End Function
Or is there a way to assign the task to a person without doing it as an "Delegated task" ?
Thanks in advance for hints.
Regards
Gerth Ericsson