Modifica

Condividi tramite


NameSpace Interface

Definition

Represents an abstract root object for any data source.

public interface class NameSpace : Microsoft::Office::Interop::Outlook::_NameSpace, Microsoft::Office::Interop::Outlook::NameSpaceEvents_Event
[System.Runtime.InteropServices.Guid("00063002-0000-0000-C000-000000000046")]
public interface NameSpace : Microsoft.Office.Interop.Outlook._NameSpace, Microsoft.Office.Interop.Outlook.NameSpaceEvents_Event
Public Interface NameSpace
Implements _NameSpace, NameSpaceEvents_Event
Derived
Attributes
Implements

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 _NameSpace. For information about the event members of the COM object, see NameSpaceEvents_Event.

The object itself provides methods for logging in and out, accessing storage objects directly by ID, accessing certain special default folders directly, and accessing data sources owned by other users.

Use GetNamespace(String) ("MAPI") to return the Outlook NameSpace object from the Application object.

The only data source supported is MAPI, which allows access to all Outlook data stored in the user's mail stores.

Properties

Accounts

Returns an Accounts collection object that represents all the Account objects in the current profile. Read-only.

(Inherited from _NameSpace)
AddressLists

Returns an AddressLists collection representing a collection of the address lists available for this session. Read-only.

(Inherited from _NameSpace)
Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

(Inherited from _NameSpace)
AutoDiscoverConnectionMode

Returns an OlAutoDiscoverConnectionMode constant that specifies the type of connection to the Exchange server for auto-discovery service. Read-only.

(Inherited from _NameSpace)
AutoDiscoverXml

Returns a String (string in C#) that represents information in XML retrieved from the auto-discovery service of an Exchange server. Read-only.

(Inherited from _NameSpace)
Categories

Returns or sets a Categories object that represents the set of Category objects available to the namespace. Read/write.

(Inherited from _NameSpace)
Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

(Inherited from _NameSpace)
CurrentProfileName

Returns a String (string in C#) representing the name of the current profile. Read-only.

(Inherited from _NameSpace)
CurrentUser

Returns the display name of the currently logged-on user as a Recipient object. Read-only.

(Inherited from _NameSpace)
DefaultStore

Returns a Store object representing the default Store for the profile. Read-only.

(Inherited from _NameSpace)
ExchangeConnectionMode

Returns an OlExchangeConnectionMode constant that indicates the current connection mode the user is using. Read-only.

(Inherited from _NameSpace)
ExchangeMailboxServerName

Returns a String (string in C#) value that represents the name of the Exchange server on which the active mailbox is hosted. Read-only.

(Inherited from _NameSpace)
ExchangeMailboxServerVersion

Returns a String (string in C#) value that represents the full version of the Exchange server on which the active mailbox is hosted. Read-only.

(Inherited from _NameSpace)
Folders

Returns the Folders collection that represents all the folders contained in the specified NameSpace. Read-only.

(Inherited from _NameSpace)
MAPIOBJECT

This object, member, or enumeration is deprecated and is not intended to be used in your code.

(Inherited from _NameSpace)
Offline

Returns a Boolean (bool in C#) indicating True if Outlook is offline (not connected to an Exchange server), and False if online (connected to an Exchange server). Read-only.

(Inherited from _NameSpace)
Parent

Returns the parent Object of the specified object. Read-only.

(Inherited from _NameSpace)
Session

Returns the NameSpace object for the current session. Read-only.

(Inherited from _NameSpace)
Stores

Returns a Stores collection object that represents all the Store objects in the current profile. Read-only.

(Inherited from _NameSpace)
SyncObjects

Returns a SyncObjects collection containing all Send\Receive groups. Read-only.

(Inherited from _NameSpace)
Type

Returns a String (string in C#) indicating the type of the specified object. Read-only.

(Inherited from _NameSpace)

Methods

AddStore(Object)

Adds a Personal Folders (.pst) file to the current profile.

(Inherited from _NameSpace)
AddStoreEx(Object, OlStoreType)

Adds a Personal Folders file (.pst) in the specified format to the current profile.

(Inherited from _NameSpace)
CompareEntryIDs(String, String)

Returns a Boolean value (bool in C#) that indicates if two entry ID values refer to the same Outlook item.

(Inherited from _NameSpace)
CreateContactCard(AddressEntry)

Creates an instance of a ContactCard object for the contact that is specified by the AddressEntry parameter.

(Inherited from _NameSpace)
CreateRecipient(String)

Creates a Recipient object.

(Inherited from _NameSpace)
CreateSharingItem(Object, Object)

Creates a new SharingItem object.

(Inherited from _NameSpace)
Dial(Object)

Displays the New Call dialog box that allows users to dial the primary phone number of a specified contact.

(Inherited from _NameSpace)
GetAddressEntryFromID(String)

Returns an AddressEntry object that represents the address entry specified by ID.

(Inherited from _NameSpace)
GetDefaultFolder(OlDefaultFolders)

Returns a Folder object that represents the default folder of the requested type for the current profile; for example, obtains the default Calendar folder for the user who is currently logged on.

(Inherited from _NameSpace)
GetFolderFromID(String, Object)

Returns a Folder object identified by the specified entry ID (if valid).

(Inherited from _NameSpace)
GetGlobalAddressList()

Returns an AddressList object that represents the Exchange Global Address List.

(Inherited from _NameSpace)
GetItemFromID(String, Object)

Returns a Microsoft Outlook item identified by the specified entry ID (if valid).

(Inherited from _NameSpace)
GetRecipientFromID(String)

Returns a Recipient object identified by the specified entry ID (if valid).

(Inherited from _NameSpace)
GetSelectNamesDialog()

Obtains a SelectNamesDialog object for the current session.

(Inherited from _NameSpace)
GetSharedDefaultFolder(Recipient, OlDefaultFolders)

Returns a Folder object that represents the specified default folder for the specified user.

(Inherited from _NameSpace)
GetStoreFromID(String)

Returns a Store object that represents the store specified by ID.

(Inherited from _NameSpace)
Logoff()

Logs the user off from the current MAPI session.

(Inherited from _NameSpace)
Logon(Object, Object, Object, Object)

Logs the user on to MAPI, obtaining a MAPI session.

(Inherited from _NameSpace)
OpenSharedFolder(String, Object, Object, Object)

Opens a shared folder referenced through a URL or file name.

(Inherited from _NameSpace)
OpenSharedItem(String)

Opens a shared item from a specified path or URL.

(Inherited from _NameSpace)
PickFolder()

Displays the Pick Folder dialog box.

(Inherited from _NameSpace)
RefreshRemoteHeaders()

This object, member, or enumeration is deprecated and is not intended to be used in your code.

(Inherited from _NameSpace)
RemoveStore(MAPIFolder)

Removes a Personal Folders file (.pst) from the current MAPI profile or session.

(Inherited from _NameSpace)
SendAndReceive(Boolean)

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

(Inherited from _NameSpace)

Events

AutoDiscoverComplete

Occurs after Outlook has finished accessing the auto-discovery service of an Exchange server and has the related information available in AutoDiscoverXml.

(Inherited from NameSpaceEvents_Event)
OptionsPagesAdd

Occurs whenever the Properties dialog box for a folder is opened.

(Inherited from NameSpaceEvents_Event)

Applies to