命名空间 SendAndReceive 方法 (Outlook)NameSpace.SendAndReceive method (Outlook)

开始立即传递在当前的会话中提交、但是尚未传递的所有邮件,并立即接收当前配置文件中所有帐户的邮件。Initiates immediate delivery of all undelivered messages submitted in the current session, and immediate receipt of mail for all accounts in the current profile.

语法Syntax

expressionexpression. SendAndReceive( _showProgressDialog_ )

_表达式_一个代表NameSpace对象的变量。expression A variable that represents a NameSpace object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
showProgressDialogshowProgressDialog 必需Required BooleanBoolean 指示是否应显示 " Outlook 发送/接收进度" 对话框, 而不考虑用户设置。Indicates whether the Outlook Send/Receive Progress dialog box should be displayed, regardless of user settings.

说明Remarks

调用SendAndReceive方法是异步的。Calling the SendAndReceive method is asynchronous.

SendAndReceive 提供了在编程上的相当于 全部发送/接收命令,可单击 工具,然后选择 发送/接收时。SendAndReceive provides the programmatic equivalent to the Send/Receive All command that is available when you click Tools and then Send/Receive.

如果不需要同步所有对象, 则可以使用**SyncObjects** 集合对象来选择特定的对象。If you do not need to synchronize all objects, you can use the SyncObjects collection object to select specific objects. 有关详细信息,请参阅 NameSpace.SyncObjectsFor 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, the connection is made according to user preferences.

另请参阅See also

命名空间对象NameSpace Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.