This section includes a sample task that pertains to Microsoft Outlook sessions. A session is a period of time during which a user logs on to Outlook. A session is represented in Outlook by the NameSpace class. This class supports logging in and out, accessing storage objects directly by ID, accessing certain special default folders directly, and accessing data sources owned by other users. The only supported data source is MAPI, which allows access to all Outlook data stored in the user's mail stores.

How to: Get and Log On to an Instance of Outlook

Obtains an Application object that represents an active instance of Outlook, if there is one running on the local computer, or creates a new instance of Outlook, logs on to the default profile, and returns that instance of Outlook.