Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delegate Outlook tasks problem - no answers recieved

Status
Not open for further replies.

JRVoyager

Programmer
Jun 18, 2003
15
SE
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
 
Hi folks

Pls disregard the oabove problem, I have found a solution to it.
After intense testing did it turn out that the problem wasn't the code it was some problem in the mailbox at the person i tested against.
Setting up a completelly new use and test agains him aswell turned out that the code is working.

/Gerth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top