Block in what way? You can handle NewMail() or NewMailEx() or ItemAdd() on
the Inbox and do something, but you can't prevent new mails from coming in
at all. You can handle item.Send() or Application.ItemSend() and cancel
send's but you can't prevent them from taking place at all.
You can also handle events for SyncObjects and cancel any that are
user-started, but you don't get anything when an automatic send/receive is
started. Of course you can handle these events only if you are supporting an
Outlook version that exposes them, which you never mention.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Unni" <(E-Mail Removed)> wrote in message
news:42976178-9377-4DEF-BF27-(E-Mail Removed)...
> Hi,
> I need to block incoming emails (basically SendAndReceive operation) in
> Outlook for a specified duration(say 1 minute).
> I need to do this programmatically in C#/C++.
>
> Please help me..
>
>
> Thanks in advance
> Unni