In The Hand - .NET Components for Mobility
OutlookSession Class
NamespacesInTheHand.WindowsMobile.PocketOutlookOutlookSession
Represents the Outlook Mobile application object.
Declaration Syntax
C#Visual Basic
public sealed class OutlookSession : IDisposable
Public NotInheritable Class OutlookSession _
	Implements IDisposable
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
OutlookSession()()()
Initializes a new instance of the OutlookSession class.

Appointments
Appointments Folder containing Appointment items.

Beam
Beam Folder used for sending and retrieving items via Infrared or Bluetooth.

Categories
Returns a collection of Categories used by Outlook Mobile.

Contacts
Contacts Folder containing Contact items.

Dispose()()()

EmailAccounts
Gets the collection of e-mail Accounts.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
FindMatchingContact(String, FindMatchingContactFlags)
Returns the Contact item with a property value that most closely matches a search string.

Requires Windows Mobile 5.0


FindMatchingContact(String)
Returns the Contact item with a property value that most closely matches a search string.

Requires Windows Mobile 5.0


GetHashCode()()()
Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetItemByItemId(ItemId)
Returns an Outlook item for a specific ItemId.

GetTimeZoneFromIndex(Int32)
Uses a time zone index to return the OutlookTimeZone object for the corresponding time zone.

GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
MessagingItemCopied
Event that occurs when a messaging item is copied from one location to another.

MessagingItemCreated
Event that occurs when a new messaging item is created.

MessagingItemDeleted
Event that occurs when a messaging item is deleted.

MessagingItemModified
Event that occurs when a messaging item is modified.

MessagingItemMoved
Event that occurs when a messaging item is moved from one location to another.

MmsAccount
Gets the MMS Account.

OutlookVersion
Retrieve the version of Outlook Mobile on the device.

SmsAccount
Gets the SMS Account.

Tasks
Tasks Folder containing Task items.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks

Equivalent to Microsoft.WindowsMobile.PocketOutlook.OutlookSession.

You must create an OutlookSession before you can perform any actions with Outlook Mobile.
Examples
This example shows how to create an OutlookSession object and retrieve the number of Contacts.
CopyC#
[VB]
            Dim polApp As InTheHand.WindowsMobile.PocketOutlook.OutlookSession
            polApp = New InTheHand.WindowsMobile.PocketOutlook.OutlookSession
            MessageBox.Show(polApp.Contacts.Items.Count.ToString())
            polApp.Dispose()
CopyC#
[C#]
            InTheHand.WindowsMobile.PocketOutlook.OutlookSession polApp; 
            polApp = new InTheHand.WindowsMobile.PocketOutlook.OutlookSession();
            MessageBox.Show(polApp.Contacts.Items.Count.ToString());
            polApp.Dispose();
Inheritance Hierarchy
Object
OutlookSession

Assembly: InTheHand.WindowsMobile (Module: InTheHand.WindowsMobile) Version: 3.2.0.0