共用方式為


Store Interface

Represents a file on the local computer or a network drive that stores e-mail messages and other items for an account in the current profile.

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

Syntax

'Declaration
<GuidAttribute("000630C7-0000-0000-C000-000000000046")> _
<CoClassAttribute(GetType(StoreClass))> _
Public Interface Store _
    Inherits _Store
'Usage
Dim instance As Store
[GuidAttribute("000630C7-0000-0000-C000-000000000046")]
[CoClassAttribute(typeof(StoreClass))]
public interface Store : _Store

Remarks

This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _Store.

A profile defines one or more e-mail accounts, and each e-mail account is associated with a server of a specific type. For an Exchange server, a store can be on the server, in an Exchange Public folder, or in a local Personal Folders File (.pst) or Offline Folder File (.ost). For a POP3, IMAP, or HTTP e-mail server, a store is a .pst file.

You can use the Stores and Store objects to enumerate all folders and search folders on all stores in the current session. Since getting the root folder or search folders in a store requires the store to be open and opening a store imposes an overhead on performance, you can check the _Store.IsOpen property before you decide to pursue the operation.

If you use an Exchange server, you can access other explicit built-in Store properties for store characteristics such as ExchangeStoreType, IsCachedExchange, and IsDataFileStore. Use the PropertyAccessor object returned by _Store.PropertyAccessor to access other store properties that are not exposed in the Outlook object model.

For more information on storing Outlook items in folders and stores, see Storing Outlook Items.

See Also

Reference

Store Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Create a Sendable Item for a Specific Account Based on the Current Folder

How to: Get the Account for a Folder

How to: Use Instant Search to Search All Folders and All Stores for a Phrase in the Subject

How to: Get Information About Stores in a Profile

How to: Search Attachments of Items in a Folder for an Exact Phrase

How to: Add or Remove a Store