Task Accepted? (1 Viewer)

M

mission2java_78

Guest
I had wrote a vbp for an Outlook com add in to update a database. I know need to modify it to check if an Outlook task has been completed. I tried MsgBoxing Item.ResponseState and it always displays 0 even if I accept or decline the task.

From outlook help it reads:
Code:
ResponseState Property
               

Returns or sets the overall status of the response to the task request. Can be one of the following OlTaskResponse constants: olTaskAccept(2), olTaskAssign(1), olTaskDecline(3), or olTaskSimple(0). 

Read-only Long.

Syntax

objTaskItem.ResponseState

objTaskItem   Required. An expression that returns a TaskItem object.

So I did a:
if Item.ResponseState = olTaskAccept then
'task accepted
MsgBox Item.ResponseState
elseif Item.ResponseState = olTaskDecline then
MsgBox Item.ResponseState
'task declined
else
MsgBox Item.ResponseState
'nothing
end if

and it always returns 0. Does anyone know why this is happening?
Jon
 

Users who are viewing this thread

Top Bottom