Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / August 2005

Tip: Looking for answers? Try searching our database.

Ho do I hook to Task completed event?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Slava Barouline - 22 Aug 2005 06:31 GMT
I would like to do something in my Add-in when user marks an Outlook Task as
completed
How can I hook to this event?

Thanks
Slava
Ken Slovak - [MVP - Outlook] - 22 Aug 2005 14:59 GMT
There is no specific event for marking a task as complete. You would have to
handle the ItemChange event for the Items collection of the folder you are
interested in and see if the item is now marked complete.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>I would like to do something in my Add-in when user marks an Outlook Task
>as completed
> How can I hook to this event?
>
> Thanks
> Slava
Slava Barouline - 23 Aug 2005 02:28 GMT
Thanks Ken

I was thinking more about Item.OnSave
Do you think it will be the same or Items.ItemChange is better?

Also I have found two properties:
8040 - Complete
804E - Status

Which one do I use (or maybe both)?
Ken Slovak - [MVP - Outlook] - 23 Aug 2005 14:22 GMT
There is no OnSave event for items in the Outlook object model. There's a
.Save event for items but you have to then have each possible item that
could be saved instantiated to handle events. That would be relatively easy
if the user opens each item before marking it complete and saving it but
that doesn't have to be. The user could mark it complete from a folder view
(Explorer) and then you'd have to trap each change in Explorer.Selection and
instantiate an event handler for each selected item and change each time
selection changed.

What API or object model are you using? Properties in Outlook would be
Complete and Status, the property tags would be irrelevant. You could read
the Complete Boolean property or check Status for olTaskComplete (2).

Where did you get those values for Complete and Status?

In MAPI terms Complete would be
GetIDsFromNames("{00062003-0000-0000-C000-000000000046}", 0x811C) OR
PT_BOOLEAN and Status would be
GetIDsFromNames("{00062003-0000-0000-C000-000000000046}", 0x8101) OR
PT_LONG.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Thanks Ken
>
[quoted text clipped - 6 lines]
>
> Which one do I use (or maybe both)?
Slava Barouline - 24 Aug 2005 01:47 GMT
Ken

I am using a mixture of ExMAPI and OOM in my Add-in

I already have DoSelection anyway, but for simplicity sake I will try
ItemChange first

You are right - I looked at tag sym instead of a value in Outlook Spy
I will try boolean Complete then
Ken Slovak - [MVP - Outlook] - 24 Aug 2005 14:37 GMT
> Also I have found two properties:
> 8040 - Complete
> 804E - Status

Complete and Status are named properties and the tag sym values would vary
from mail store to mail store. For example on my Exchange mailbox the tag
sym for Complete is 0x8044 and for Status it's 0x807B. You cannot depend on
a named property having the exact same value on different mail stores, you
have to use some method like GetIDsFromNames to get the actual property tag
for that specific mail store.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Ken
>
[quoted text clipped - 5 lines]
> You are right - I looked at tag sym instead of a value in Outlook Spy
> I will try boolean Complete then
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.