Class NameSpace (Outlook VBA)

The class NameSpace represents an abstract root object for any data source.

The classes Account, AccountRuleCondition, AccountSelector, Action, AddressEntry, AddressList, AddressRuleCondition, Application, AppointmentItem, AssignToCategoryRuleAction, Attachment, AutoFormatRule, BusinessCardView, CalendarModule ... give access to class NameSpaceCalendarSharing, CalendarView, CardView, Category, CategoryRuleCondition, Column, ColumnFormat, Conflict, ContactItem, ContactsModule, Conversation, ConversationHeader, DistListItem, DocumentItem, Exception, ExchangeDistributionList, ExchangeUser, Explorer, Folder, Folders, FormDescription, FormNameRuleCondition, FormRegion, FromRssFeedRuleCondition, IconView, ImportanceRuleCondition, Inspector, ItemProperty, JournalItem, JournalModule, MailItem, MailModule, MarkAsTaskRuleAction, MeetingItem, MoveOrCopyRuleAction, NavigationFolder, NavigationGroup, NavigationModule, NavigationPane, NewItemAlertRuleAction, NoteItem, NotesModule, OrderField, OutlookBarGroup, OutlookBarPane, OutlookBarShortcut, OutlookBarStorage, Pages, PeopleView, PlaySoundRuleAction, PostItem, PreviewPane, PropertyAccessor, PropertyPages, PropertyPageSite, Recipient, RecurrencePattern, Reminder, RemoteItem, ReportItem, Results, Row, Rule, RuleAction, RuleCondition, Search, SearchView, Selection, SelectNamesDialog, SenderInAddressListRuleCondition, SendRuleAction, SensitivityRuleCondition, SharingItem, SimpleItems, SolutionsModule, StorageItem, Store, SyncObject, Table, TableView, TaskItem, TaskRequestAcceptItem, TaskRequestDeclineItem, TaskRequestItem, TaskRequestUpdateItem, TasksModule, TextRuleCondition, TimelineView, TimeZone, ToOrFromRuleCondition, UserDefinedProperty, UserProperty, View, ViewField, ViewFont.

Dim nse as NameSpace
Set nse = Session

Methods

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

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

CompareEntryIDs - Returns a Boolean value that indicates if two entry ID values refer to the same Outlook item.

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

CreateRecipient - Creates a Recipient object.

CreateSharingItem - Creates a new SharingItem object.

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

GetAddressEntryFromID - Returns an AddressEntry object that represents the address entry for the specified ID.

GetDefaultFolder - 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.

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

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

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

GetRecipientFromID - Returns the Recipient object that is identified by the specified entry ID (if valid).

GetSelectNamesDialog - Obtains a SelectNamesDialog object for the current session.

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

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

Logoff - Logs the user off from the current MAPI session.

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

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

OpenSharedItem - Opens a shared item from a specified path or URL.

PickFolder - Displays the Pick Folder dialog box.

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

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

Properties

Accounts returns an Accounts collection object that represents all the Account objects in the current profile.

AddressLists returns an AddressLists collection representing a collection of the address lists available for this session.

AutoDiscoverConnectionMode returns an OlAutoDiscoverConnectionMode constant that specifies the type of connection for auto-discovery of the Microsoft Exchange server that hosts the primary Exchange account.

AutoDiscoverXml returns a String that represents information in XML retrieved from the auto-discovery service for the Microsoft Exchange server that hosts the primary Exchange account.

Categories returns or sets a Categories object that represents the set of Category objects that are available to the namespace.

Class returns an OlObjectClass constant indicating the object's class.

CurrentProfileName returns a String representing the name of the current profile.

CurrentUser returns the display name of the currently logged-on user as a Recipient object.

DefaultStore returns a Store object representing the default Store for the profile.

ExchangeConnectionMode returns an OlExchangeConnectionMode constant that indicates the connection mode of the user's primary Exchange account.

ExchangeMailboxServerName returns a String value that represents the name of the Exchange server that hosts the primary Exchange account mailbox.

ExchangeMailboxServerVersion returns a String value that represents the full version number of the Exchange server that hosts the primary Exchange account mailbox.

Folders returns the Folders collection that represents all the folders contained in the specified NameSpace.

Offline returns a Boolean indicating True if Outlook is offline (not connected to an Exchange server), and False if online (connected to an Exchange server).

Session returns the NameSpace object for the current session.

Stores returns a Stores collection object that represents all the Store objects in the current profile.

SyncObjects returns a SyncObjects collection containing all Send\Receive groups.

Type returns a String indicating the type of the specified object.

Accounts - The Accounts collection object contains a set of Account objects representing the accounts available for the current profile.

AddressEntry - Represents a person, group, or public folder to which the messaging system can deliver messages.

AddressList - Represents an address book that contains a set of AddressEntry objects.

AddressLists - Contains a set of AddressList objects.

Categories - Represents the collection of Category objects that define the Master Category List for a namespace.

Folder - Represents an Outlook folder.

Folders - Contains a set of Folder objects that represent all the available Outlook folders in a specific subset at one level of the folder tree.

Recipient - Represents a user or resource in Outlook, generally a mail or mobile message addressee.

SelectNamesDialog - Displays the Select Names dialog box for the user to select entries from one or more address lists, and returns the selected entries in the collection object specified by the property SelectNamesDialog.Recipients.

SharingItem - Represents a sharing message in an Inbox folder.

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

Stores - A set of Store objects representing all the stores available in the current profile.

SyncObjects - Contains a set of SyncObject objects representing the Send/Receive groups for a user.