命名空间 Session 属性 (Outlook)NameSpace.Session property (Outlook)

返回当前会话的**NameSpace** 对象。Returns the NameSpace object for the current session. 此为只读属性。Read-only.

语法Syntax

表达式会话expression.Session

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

说明Remarks

Session属性和**GetNamespace** 方法可互换使用, 以获取当前会话的NameSpace对象。The Session property and the GetNamespace method can be used interchangeably to obtain the NameSpace object for the current session. 这两个成员可以实现同一目的。Both members serve the same purpose. 例如,下列语句执行相同功能:For example, the following statements do the same function:

Set objNamespace = Application.GetNamespace("MAPI") 
Set objSession = Application.Session

另请参阅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.