Session Object

The Session object contains session-wide settings and options. It also contains properties that return top-level objects, such as CurrentUser.

Quick Info

Specified in header file:

MDISP.ODL

First available in version:

OLE Messaging Library 1.0

Parent objects:

(none)

Child objects:

AddressLists3OA6JWC collection
Folder (Inbox or Outbox)
InfoStoresX9N77_ collection

Default property:

NameJ5UQ_W

 

Properties

 
Property name

Available in version

 
Type

 
Access

AddressLists_7AWJJ

1.1

AddressList object or AddressLists collection object

Read-only

Application5GI0QO

1.0

String

Read-only

Class1CT5_O0

1.0

Long

Read-only

CurrentUser21ID0O_

1.0

AddressEntry object

Read-only

 

 

 

 

Inbox1BPW5IP

1.0

Folder object

Read-only

InfoStoresXEOE7P

1.0

InfoStores object

Read-only

MAPIOBJECTCH.T47

1.0

Object

Read/write (Note: Not available to Visual Basic applications.)

NameJ5UQ_W

1.0

String

Read-only

OperatingSystem2.LJ0S7

1.0

String

Read-only

Outbox1Q5W.E

1.0

Folder object

Read-only

Parent13HN1VR

1.0

Object; set to Nothing

Read-only

Session23X3PG

1.0

Object; set to Nothing

Read-only

VersionVLKW1Q

1.0

String

Read-only

 

Methods

 
Method name

Available in version

 
Parameters

AddressBook8XQXJX

1.0

(optional) recipients as Object,
(optional) title as String,
(optional) oneAddress as Boolean,
(optional) forceResolution as Boolean,
(optional) recipLists as Long,
(optional) toLabel as String,
(optional) ccLabel as String,
(optional) bccLabel as String,
(optional) parentWindow as Long

 

 

 

CompareIDs.OGP7E

1.1

ID1 as Object,
ID2 as Object

DeliverNowY2S6NJ

1.1

(none)

GetAddressEntry23V8LG

1.0

entryID as String

GetFolder67IU1J

1.0

folderID as String,
storeID as String

 

 

 

GetInfoStore11N7U6I

1.0

storeID as String

GetMessageOG58GS

1.0

messageID as String,
storeID as String

Logoff21I77CJ

1.0

(none)

LogonFE5E_Q

1.0

(optional) profileName as String,
(optional) profilePassword as String,
(optional) showDialog as Boolean,
(optional) newSession as Boolean,
(optional) parentWindow as Long

 

Remarks

A Session object is considered a top-level object, meaning it can be created directly from a Visual Basic program. The following sample code fragment creates a Session object through early binding:

Dim objSession as MAPI.Session

objSession.Logon

 

The following sample code fragment creates a Session object through late binding:

Dim objSession As Object

Set objSession = CreateObject (  MAPI.Session  )

objSession.Logon

 

After you create a new Session object, use the LogonFE5E_Q method to initiate a session with MAPI.