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

返回一个**store** 对象, 该对象代表由_ID_指定的存储区。Returns a Store object that represents the store specified by ID.

语法Syntax

expressionexpression. GetStoreFromID( _ID_ )

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

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
IDID 必需Required StringString 一个用来标识存储区的字符串值。A string value identifying a store.

返回值Return value

具有匹配_ID_的**StoreID** 属性的Store对象。A Store object that has the StoreID property matching ID.

备注Remarks

StoreStoreID属性是会话的配置文件的唯一属性。The StoreID property of a Store is unique to the profile for the session. 它相当于 PR_STORE_ENTRY_ID 的 MAPI 属性。It is equivalent to the MAPI property PR_STORE_ENTRY_ID.

必须安装存储区,才能使该方法成功。The store must be mounted in order for this method to succeed.

如果当前会话中找不到具有指定_ID_的存储区, GetStoreFromID将返回错误。GetStoreFromID returns an error if no store with the specified ID can be found for the current 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.