how to know if outlook finish sending/receiving?

  • Thread starter Thread starter junran
  • Start date Start date
J

junran

When outlook does send/receive it shows "sending 1 of 2 messages" or
"receiving 1 of 5 messages".

Is ther any code I can use to get that total number of messages (like
5) what outlook is receiving?
 
That isn't exposed to the Outlook object model and I don't know how
you'd do that. You'd somehow have to tap into the MAPI spooler.
 
I want to monitor if outlook finish sending/receving, so I
can process those messages I received.

I did try SyncStart And SyncEnd event, but SyncEnd was
fired before Outlook finish receiving.
 
As I said, I don't know of a way to get what you want. If you are
processing incoming items why not just handle ItemAdd on the Inbox
Items collection and process the items as they come in? That way it
doesn't matter when a send/receive is finished.
 
can i use vba code from outlook to check how many Emails
ther are in my pop3 server before i do send/receive? so I
can use Newmail Event to count them once i receive them.
then i know if outlook finish receiving.
 
Thank you very much, I'm going to try that way
-----Original Message-----
As I said, I don't know of a way to get what you want. If you are
processing incoming items why not just handle ItemAdd on the Inbox
Items collection and process the items as they come in? That way it
doesn't matter when a send/receive is finished.







.
 
You could open a telnet session and use code to send commands to the
server to say how many messages were waiting to be downloaded, or
something like that, but that's about it. You can't do anything like
that from Outlook or CDO code at all.

NewMail is no good for what you want. It doesn't give you the item
that was received, how many items were received and only fires at
intervals, typically every few minutes. In between that it doesn't
fire at all.
 
Back
Top