Search notes:

Outlook Object Model: Namespace

The namespace object is returned by application.getNamespace("Mapi") or application.session.

Methods and properties

accounts Returns a collection of all account objects in the current profile.
addressLists Returns a collection of all addressList objects for «this» session.
addStore()
addStoreEx()
application
autoDiscoverConnectionMode
autoDiscoverXml
categories Returns a collection of category objects (such as Red, Green, Yellow etc.) which can be applied to Outlook items.
class
compareEntryIDs()
createContactCard()
createRecipient()
createSharingItem()
currentProfileName
currentUser
defaultStore
dial()
exchangeConnectionMode
exchangeMailboxServerName
exchangeMailboxServerVersion
folders Returns the collection of folder objects that represent all available folders in a specific subset of a level of the folder tree.
getAddressEntryFromID()
getDefaultFolder()
getFolderFromID()
getGlobalAddressList()
getItemFromID()
getRecipientFromID()
getSelectNamesDialog()
getSharedDefaultFolder()
getStoreFromID()
logoff()
logon()
offline
openSharedFolder()
openSharedItem()
parent
pickFolder()
removeStore()
sendAndReceive()
session
stores
syncObjects
type

String properties

option explicit

sub main()

    dim ns        as outlook.namespace
    dim connMode  as olExchangeConnectionMode
    dim connMode_ as string

    set ns   = application.getNamespace("MAPI")

    connMode = ns.exchangeConnectionMode

    if     connMode    = olCachedConnectedDrizzle  then
           connMode_   ="olCachedConnectedDrizzle"
    elseif connMode    = olCachedConnectedFull     then
           connMode_   ="olCachedConnectedFull"
    elseif connMode    = olCachedConnectedHeaders  then
           connMode_   ="olCachedConnectedHeaders"
    elseif connMode    = olCachedDisconnected      then
           connMode_   ="olCachedDisconnected"
    elseif connMode    = olCachedOffline           then
           connMode_   ="olCachedOffline"
    elseif connMode    = olDisconnected            then
           connMode_   ="olDisconnected"
    elseif connMode    = olNoExchange              then
           connMode_   ="olNoExchange"
    elseif connMode    = olOffline                 then
           connMode_   ="olOffline"
    elseif connMode    = olOnline                  then
           connMode_   ="olOnline"
    end if


    debug.print "currentUser                 : " &ns.currentUser
    debug.print "currentProfileName          : " &ns.currentProfileName
    debug.print "defaultStore                : " &ns.defaultStore
    debug.print "exchangeConnectionMode      : " &   connMode_
'   debug.print "exchangeMailboxServerName   : " &ns.exchangeMailboxServerName
    debug.print "exchangeMailboxServerVersion: " &ns.exchangeMailboxServerVersion
    debug.print "offline                     : " &ns.offline
    debug.print "type                        : " &ns.type


end sub
Github repository about-MS-Office-object-model, path: /Outlook/Namespace/stringProperties.vb

See also

Outlook Object Model

Index