Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Any event when Receiving tasks complet? (http://www.outlookbanter.com/outlook-vba/7415-any-event-when-receiving-tasks.html)

iammark February 8th 06 10:00 PM

Any event when Receiving tasks complet?
 
Hi,

I am play VBA in Microsoft Outlook.
Do you know how to fire an event when the Receiving tasks complet?

Thank you in advance.


Ken Slovak - [MVP - Outlook] February 8th 06 10:05 PM

Any event when Receiving tasks complet?
 
The PropertyChange event should fire in that case. The input argument for
that event will tell you what property was changed.

Or do you mean when the Inbox receives a complete notification for an
assigned task? In that case you would receive an ItemAdd event on the Items
collection of the Inbox.

--
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


"iammark" wrote in message
ups.com...
Hi,

I am play VBA in Microsoft Outlook.
Do you know how to fire an event when the Receiving tasks complet?

Thank you in advance.



iammark February 8th 06 10:33 PM

Any event when Receiving tasks complet?
 
Thank you for your quick response.

In fact, I need to do deal with every new email. I have tried the
ItemAdd event. The problem is when receiving more than one email, only
one event fired.
Now, I am trying only to record new email items in the ItemAdd event
without doing anything, until the Receiving tasks complet, then I will
deal with all the new emails....
Can I do that?


Ken Slovak - [MVP - Outlook] February 9th 06 12:29 AM

Any event when Receiving tasks complet?
 
ItemAdd will fire unless you get more than about 16 items at a time.
Otherwise it's a question of your event handler taking too much time and
therefore missing the following event.

Is this Outlook 2003 VBA? If so you could use the Application.NewMailEx
event which passes an array of EntryID's for each new item. You can parse
the array and use NameSpace.GetItemFromID to get those items using the
EntryID's.

--
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


"iammark" wrote in message
oups.com...
Thank you for your quick response.

In fact, I need to do deal with every new email. I have tried the
ItemAdd event. The problem is when receiving more than one email, only
one event fired.
Now, I am trying only to record new email items in the ItemAdd event
without doing anything, until the Receiving tasks complet, then I will
deal with all the new emails....
Can I do that?



iammark February 9th 06 01:03 AM

Any event when Receiving tasks complet?
 
Yes, I need to deal with the new email and it must take too much time!!
I am using Outlook 2000 :(
Any event will be fired when Outlook finished receiving the new emails?


Ken Slovak - [MVP - Outlook] February 9th 06 03:41 PM

Any event when Receiving tasks complet?
 
No. The NewMail event only fires every so often and can't be depended on at
all. ItemAdd is your only option with Outlook 2000.

Just set up in your ItemAdd handler enough information stored in a
collection or something so you can later process the items. Then set up a
call-back to do the processing after you exit ItemAdd. A timer would do the
trick. When the timer fires you process each item in the collection. If
ItemAdd fires again you're not in that interrupt handler so it won't be
blocked.

--
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


"iammark" wrote in message
ups.com...
Yes, I need to deal with the new email and it must take too much time!!
I am using Outlook 2000 :(
Any event will be fired when Outlook finished receiving the new emails?



iammark February 9th 06 05:15 PM

Any event when Receiving tasks complet?
 
Thank you. It looks not so easy :(

Is there any event we can use just before Outlook finishes
"Send/Receive" for one folder or finishes the whole proccess?

The "Timer" you mentioned is an API timere or available in Outlook VBA?


iammark February 9th 06 05:16 PM

Any event when Receiving tasks complet?
 
Thank you. It looks not so easy :(

Is there any event we can use just before Outlook finishes
"Send/Receive" for one folder or finishes the whole proccess?

The "Timer" you mentioned is an API timere or available in Outlook VBA?


Ken Slovak - [MVP - Outlook] February 9th 06 08:25 PM

Any event when Receiving tasks complet?
 
No, there's no way at all to tell that. You can get an event for SyncObjects
ending if you initiate the sync (send/receive) using code but not if the
user starts the cycle.

I usually use a Win32 API timer.

--
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


"iammark" wrote in message
oups.com...
Thank you. It looks not so easy :(

Is there any event we can use just before Outlook finishes
"Send/Receive" for one folder or finishes the whole proccess?

The "Timer" you mentioned is an API timere or available in Outlook VBA?



iammark February 9th 06 10:22 PM

Any event when Receiving tasks complet?
 
Thanks a lot for your helps.
I will try the API timer.



All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com