_NameSpace.SendAndReceive Method

Initiates immediate delivery of all undelivered messages submitted in the current session, and immediate receipt of mail for all accounts in the current profile.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Sub SendAndReceive ( _
    showProgressDialog As Boolean _
)
'Usage
Dim instance As _NameSpace
Dim showProgressDialog As Boolean

instance.SendAndReceive(showProgressDialog)
[DispIdAttribute()]
void SendAndReceive(
    bool showProgressDialog
)

Parameters

  • showProgressDialog
    Type: System.Boolean

    Indicates whether the Outlook Send/Receive Progress dialog box should be displayed, regardless of user settings.

Remarks

Calling the SendAndReceive method is synchronous.

SendAndReceive provides the programmatic equivalent to the Send/Receive All command that is available when you click Tools and then Send/Receive.

If you do not need to synchronize all objects, you can use the SyncObjects collection object to select specific objects. For more information, see _NameSpace.SyncObjects.

All accounts defined in the current profile are used in Send/Receive All. If an online connection is required to perform the Send/Receive All, then the connection is made according to user preferences.

See Also

Reference

_NameSpace Interface

_NameSpace Members

Microsoft.Office.Interop.Outlook Namespace