Microsoft KB Archive/265771

= How to access Pocket Outlook objects from eMbedded Visual Basic and VBCE =

Article ID: 265771

Article Last Modified on 1/6/2006

-

APPLIES TO


 * Microsoft eMbedded Visual Basic 3.0
 * Microsoft Windows CE Toolkit for Visual Basic 6.0

-



This article was previously published under Q265771



SUMMARY
This article introduces the Pocket Outlook Object Model (POOM) SDK to developers who use Microsoft Windows CE Toolkit for Visual Basic 6.0 (VBCE6) or eMbedded Visual Basic 3.0 (eVB). The following topics are covered:
 * 1) What is the Pocket Outlook Object Model (POOM) SDK?
 * 2) Where to obtain the POOM SDK.
 * 3) How to install and register the POOM SDK on a device.
 * 4) Emulation.
 * 5) An overview of the POOM.
 * 6) How you can begin to program with the POOM SDK, as follows:
 * 7) * How to log on and log off.
 * 8) * How to create a new contact.
 * 9) * How to view information about a contact.
 * 10) * How to obtain a list of contacts.
 * 11) * How to create an appointment.
 * 12) * How to obtain appointment information.
 * 13) * How to create a task.
 * 14) * How to obtain task information.
 * 15) * How to add a city.
 * 16) * How to obtain city and time zone information.
 * 17) * How to specify a home and visiting city.
 * 18) * How to send items through Infrared transfer.
 * 19) * How to receive items through Infrared transfer.



MORE INFORMATION
 What is the Pocket Outlook Object Model (POOM) SDK?

The Pocket Outlook Object Model SDK is the means by which the object model for Pocket Outlook is exposed to programmers who use the Windows CE Toolkits for Visual Basic 6.0 and Microsoft Visual C++ 6.0 (VCCE6), as well as the eMbedded Visual Tools 3.0. This allows for programmatic manipulation of Contact, Calendar, and Task data, as well as the capability to view City and TimeZone information. Where to obtain the POOM SDK.

The POOM SDK can be downloaded from the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=78d1a8b7-d606-45b2-9cdc-58bf5a578338&displaylang=en

  How to install and register the POOM SDK on a device.

Note The pimstore.dll file is already present in ROM on Pocket PC devices, so the following steps are not necessary for Pocket PC.

After you download the POOM SDK, run the pimstore.exe file to extract its contents. To use the POOM, you need to install and register pimstore.dll file on your Windows CE Companion device. The DLL for each CPU is copied to your PC when you download and run the self-extracting .exe file. The DLLs are distinguished by name; for example, pimstore_sh3.dll supports the SH3 processor. To use POOM, drag the pimstore_*.dll for your CPU to the \Windows directory of your companion device. Rename the DLL to &quot;pimstore.dll&quot; without the underscore and CPU designation.

Register the pimstore.dll on the device. You can do this in several different ways, which include running regsvr.exe on the device as follows:   \windows\regsvr.exe \windows\pimstore.dll Another alternative is to compile the sample code that is listed in the POOM SDK ReadMe.txt file.  Emulation.

The POOM SDK is supported with the Pocket PC emulation environment.

 An overview of the POOM.

The Pocket Outlook Object Model is modeled after the Microsoft Outlook 97 and Microsoft Outlook 98 Object Models on the desktop. In order to provide a smaller DLL that is better suited for Windows CE devices, POOM is a smaller subset of the desktop Outlook Object Model.

The Pocket Outlook Object Model meets the following goals:  Backward compatibility. The component runs on the following platforms: <ul> Handheld PC 2.0</li> Handheld PC Pro 3.0</li> Handheld PC 2000</li> Palm-size PC 1.2</li> Pocket PC</li></ul>

The component exists on top of existing components that have not changed since the Handheld PC 2.0.</li> Future extensibility. The interfaces are designed to be extensible in the future. For example, there is a Folder object, which is little more than a wrapper around a database in this version.</li> Outlook compatibility. Although it is based on the desktop edition of the Outlook Object Model, there are some differences that exist to achieve simplicity on the device. For example, a NameSpace object is not provided, which Outlook uses to log on to a MAPI session, and which would be an extra layer on Windows CE devices. It is more accurate to say that the Pocket Outlook Object Model is based on the desktop Outlook Object Model rather than to say it is a subset of the model.</li> Automation object. The automation object has a dual interface that allows Microsoft Visual Basic and scripting programmers to use the Object Model. Although the method and property names are more complicated in Microsoft C or Visual C++ than they are in Visual Basic, this is an important trade-off for customers.</li> Simplicity. The interfaces are meant to be quite simple and, as such, represent a small subset of the desktop Outlook Object Model functionality.</li></ol>

The main interface to the Pocket Outlook Object Model is the Pocket Outlook Application object. All other objects are derived from this. After you log on to the Application object, you can access various Folder objects.

A Folder object contains a collection of Items. This folder implementation is a subset of the Folder object of Outlook. The Folder object is a wrapper for the Contacts, Clock, Calendar, and Tasks databases. There is only one folder for each type of item. The Folder object itself cannot be created or otherwise manipulated. The Folder object is provided mainly for compatibility with Outlook. An Infrared Folder is also provided, which you can use to send items over an Infrared port.

From the Folder object, you have the Items collection, which is a collection of Contacts, Tasks, Appointments, or Cities. From an Items collection, you can retrieve or create individual items. The Items collection also allows you to do basic filtering over a collection of objects.

With an individual Item, you can set and retrieve individual properties. You can create, modify, or delete an item in the store. Note that Cities are read-only items and cannot be created or modified.

Task and Appointment items support the RecurrencePattern object that lets you set up a recurrence for a task or an appointment. Appointments also support the Recipients collection that allows you to specify recipients for a meeting. If an appointment has a recipients collection, it is a meeting request.

The following table represents the basic Pocket Outlook Object Model: </li> How You Can Begin to Program with the POOM SDK.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Before you start to program with the POOM, set a reference to the DLL to use IntelliSense Help. To do this, on the Project menu, select References, and then browse until you find the pimstore_i486.dll file that ships with the POOM. <ul>  How to log on and log off

The Logon and Logoff methods should be the first and last methods called, respectively, on a Pocket Outlook Application Object. Logon logs the user onto a Pocket Outlook session and Logoff logs the user out.

These methods are called as follows: Option Explicit Dim pOLA As PocketOutlook.Application

Private Sub Form_Load

Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) 'Since you are going to be displaying items, you pass in the 'form’s HWND to Logon so that dialog boxes will be parented to   'this window. Otherwise, the user could display 'multiple items at a time. pOLA.Logon (Form1.hWnd) 'logs on to a session End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff   'logs off of a session End Sub </li> How to create a new contact <ol> Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li>  Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pContact As PocketOutlook.ContactItem Const olCreateContact = 2

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) AddNewContact &quot;Maxwell&quot;, &quot;Smart&quot; End Sub

Function AddNewContact(sFirstName As String, sLastName As String) As Long Set pContact = pOLA.CreateItem(olCreateContact) pContact.FirstName = sFirstName pContact.LastName = sLastName pContact.Save Set pContact = Nothing End Function

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> How to view information about a contact

Note This sample assumes that a specific contact exists. <ol> Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pContact As PocketOutlook.ContactItem Const olFolderContacts = 10

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click DisplayContact &quot;Smart, Maxwell&quot; End Sub

Sub DisplayContact(inpContactName As String) Set pContact = pOLA.GetDefaultFolder(olFolderContacts).Items.Find( _       &quot;[FileAs] = &quot;&quot;&quot; & inpContactName & &quot;&quot;&quot;&quot;) Set pContact = pOLA.GetItemFromOid(pContact.oid) pContact.Display Set pContact = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to obtain a list of contacts <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a ListBox control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pContact As PocketOutlook.ContactItem Dim pItems As PocketOutlook.Items Const olFolderContacts = 10

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) GetContacts List1 End Sub

Private Sub GetContacts(lstCtrl As ListBox) Dim i As Integer lstCtrl.Clear 'Add all the Contacts to a ListBox. Start by getting the 'Contacts folder, and then get its Item Collection. Set pItems = pOLA.GetDefaultFolder(olFolderContacts).Items For i = 1 To pItems.Count Set pContact = pItems.Item(i) lstCtrl.AddItem i & &quot;: &quot; & pContact.FileAs Next i   Set pItems = Nothing Set pContact = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to create an appointment <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pApptItem As PocketOutlook.AppointmentItem Const olCreateAppointment = 1

Private Sub Command1_Click NewAppt &quot;Meet with Chief&quot;, &quot;Cone of Silence Room&quot;, _ &quot;Discuss shoe phone repair bills&quot;, _ CDate(&quot;12/15/00 08:30:00 AM&quot;), _ CDate(&quot;12/15/00 10:30:00 AM&quot;) End Sub

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub NewAppt(sSubject As String, sLoc As String, _       sBody As String, dStart As Date, dEnd As Date) Set pApptItem = pOLA.CreateItem(olCreateAppointment) pApptItem.Subject = sSubject pApptItem.Location = sLoc pApptItem.Body = sBody pApptItem.Start = dStart pApptItem.End = dEnd pApptItem.Save Set pApptItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to obtain appointment information

Note This sample assumes that an appointment exists for today. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton and a ListBox control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pApptItem As PocketOutlook.AppointmentItem Dim pItems As PocketOutlook.Items Const olFolderCalendar = 9

Private Sub Command1_Click ViewTodaysAppointments Date, List1 End Sub

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Sub ViewTodaysAppointments(inpDate As Date, lstCtrl As ListBox) Dim iItem As Integer lstCtrl.Clear Set pItems = pOLA.GetDefaultFolder(olFolderCalendar).Items 'Use the Restrict method to find only those items with a start 'date of today. pTodaysItems will be a new Item Collection that 'contains only those items that pass the restriction of   'occurring today. Set pItems = pItems.Restrict(&quot;[Start] = &quot;&quot;&quot; & inpDate & &quot;&quot;&quot;&quot;) For iItem = 1 To pItems.Count Set pApptItem = pItems.Item(iItem) lstCtrl.AddItem pApptItem.Subject & &quot; at &quot; & _ FormatDateTime(pApptItem.Start, vbShortTime) Next Set pItems = Nothing Set pApptItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to create a task <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pTaskItem As PocketOutlook.TaskItem Const olCreateTasks = 3 Const olDialog = 1 Const olSound = 8

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click NewTask &quot;Pick up shoe phone at repair shop&quot;, &quot;Watch out for KAOS&quot;, _ Now + 2, Now, &quot;Alarm3&quot;, True End Sub

Sub NewTask(sSubject As String, sBody As String, _       dDue As Date, dStart As Date, _        sSoundFile As String, bReminderSet As Boolean) Set pTaskItem = pOLA.CreateItem(olCreateTasks) pTaskItem.Subject = sSubject pTaskItem.Body = sBody pTaskItem.DueDate = dDue pTaskItem.StartDate = dStart pTaskItem.ReminderSet = bReminderSet If bReminderSet Then pTaskItem.ReminderOptions = olSound Or olDialog pTaskItem.ReminderSoundFile = sSoundFile pTaskItem.ReminderTime = dDue - 1 End If   pTaskItem.Save Set pTaskItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to obtain task information <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add two CommandButton controls and one ListBox control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pTaskItem As PocketOutlook.TaskItem Dim pItems As PocketOutlook.Items Const olFolderTasks = 13

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) Command1.Caption = &quot;View Today's Tasks&quot; Command2.Caption = &quot;View All Tasks&quot; End Sub

Private Sub Command1_Click ViewTodaysTasks Date + 1, List1 End Sub

Private Sub Command2_Click ViewAllTasks List1 End Sub

Sub ViewTodaysTasks(inpDate As Date, lstCtrl As ListBox) Dim iItem As Integer lstCtrl.Clear Set pItems = pOLA.GetDefaultFolder(olFolderTasks).Items 'Use the Restrict method to find only those items with a due 'date of today. Set pItems = pItems.Restrict(&quot;[Duedate] = &quot;&quot;&quot; & inpDate & &quot;&quot;&quot;&quot;) For iItem = 1 To pItems.Count Set pTaskItem = pItems.Item(iItem) lstCtrl.AddItem pTaskItem.Subject Next Set pItems = Nothing Set pTaskItem = Nothing End Sub

Sub ViewAllTasks(lstCtrl As ListBox) Dim iItem As Integer lstCtrl.Clear Set pItems = pOLA.GetDefaultFolder(olFolderTasks).Items For iItem = 1 To pItems.Count Set pTaskItem = pItems.Item(iItem) lstCtrl.AddItem pTaskItem.Subject & &quot; on &quot; & _ FormatDateTime(pTaskItem.DueDate, vbShortDate) Next Set pItems = Nothing Set pTaskItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to add a city

Cities exist in the World Clock Control Panel applet and can be either user-defined or in ROM. In ROM, cities cannot be modified.

Note On Pocket PC-based devices, Cities information is found on the Settings menu option in the Clock applet.

When you set either the Longitude or Latitude properties of the City object, use the following standards: <ul> <li>West is negative, East is positive. For example, 104.98 degrees W is -10498.</li> <li>South is negative, North is positive. For example, 39.77 degrees N is 3977.</li></ul>

Note Before you run the following code, close the World Clock Control Panel applet (Clock applet on Pocket PC-based devices). Otherwise, an error results. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pCityItem As PocketOutlook.CityItem Dim pItems As PocketOutlook.Items Const olFolderCities = 101 Const olCreateCity = 102

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click AddNewCity &quot;Steilacoom, WA&quot;, &quot;USA&quot; End Sub

Private Sub AddNewCity(sCityName As String, _                      sCountryName As String) 'Check to see if city exists first because 'we won't get an error if it's created twice. If CityExists(sCityName) = True Then MsgBox &quot;City already exists&quot; Exit Sub End If   Set pCityItem = pOLA.CreateItem(olCreateCity) pCityItem.Name = sCityName pCityItem.Country = sCountryName pCityItem.Save Set pCityItem = Nothing End Sub

Private Function CityExists(sCityName As String) As Boolean Set pItems = pOLA.GetDefaultFolder(olFolderCities).Items Set pCityItem = pItems.Find(&quot;[NAME] = &quot;&quot;&quot; & sCityName & &quot;&quot;&quot;&quot;)

If pCityItem Is Nothing Then CityExists = False Else CityExists = True End If   Set pCityItem = Nothing End Function

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to obtain city and time zone information

Note Before you run the following code, close the World Clock Control Panel applet (Clock applet on Pocket PC-based devices). Otherwise, an error results. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Const olFolderCities = 101 Dim pOLA As PocketOutlook.Application Dim pCity As PocketOutlook.CityItem

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click FindCityTimeZone &quot;Sioux Falls, SD&quot; End Sub

Private Sub FindCityTimeZone(inpCity As String) Dim sTimeZone As String Set pCity = pOLA.GetDefaultFolder(olFolderCities).Items.Find( _       &quot;[NAME] = &quot;&quot;&quot; & inpCity & &quot;&quot;&quot;&quot;) sTimeZone = pOLA.GetTimeZoneFromIndex( _       pCity.TimezoneIndex).StandardName MsgBox pCity.Name & &quot; is in the '&quot; & sTimeZone & &quot;' time zone.&quot; Set pCity = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to specify a home and visiting city

Note Before you run the following code, close the World Clock Control Panel applet (Clock applet on Pocket PC-based devices). Otherwise, an error results. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add two CommandButton controls to Form1.</li> <li> Paste the following code into Form1: Option Explicit Const olFolderCities = 101 Const olHomeCity = 0 Const olVisitingCity = 1 Dim pOLA As PocketOutlook.Application Dim pCity As PocketOutlook.CityItem

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) Command1.Caption = &quot;Visiting&quot; Command2.Caption = &quot;Home&quot; End Sub

Private Sub Command1_Click CitySetVisit &quot;Vancouver, BC&quot; End Sub

Private Sub Command2_Click CitySetHome &quot;Seattle, WA&quot; End Sub

Private Sub CitySetVisit(inpCity As String) Set pCity = pOLA.GetDefaultFolder(olFolderCities).Items.Find( _       &quot;[NAME] = &quot;&quot;&quot; & inpCity & &quot;&quot;&quot;&quot;) pOLA.VisitingCity = pCity pOLA.CurrentCityIndex = olVisitingCity MsgBox &quot;Visiting city is now: &quot; & pOLA.VisitingCity.Name Set pCity = Nothing End Sub

Private Sub CitySetHome(inpCity As String) Set pCity = pOLA.GetDefaultFolder(olFolderCities).Items.Find( _       &quot;[NAME] = &quot;&quot;&quot; & inpCity & &quot;&quot;&quot;&quot;) pOLA.HomeCity = pCity pOLA.CurrentCityIndex = olHomeCity MsgBox &quot;Home city is now: &quot; & pOLA.HomeCity.Name Set pCity = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to send items through Infrared transfer

This sample sends a newly created TaskItem through Infrared transfer. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pFolder As PocketOutlook.Folder Dim pTaskItem As PocketOutlook.TaskItem Const olTaskItem = 3 Const olFolderInfrared = 102 Const olCreateTasks = 3

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click 'Set up a task Set pTaskItem = pOLA.CreateItem(olCreateTasks) pTaskItem.Subject = &quot;Pick up shoe phone at repair shop&quot; pTaskItem.StartDate = Now  'today pTaskItem.DueDate = Now + 1 'tomorrow pTaskItem.Save

'Ship it over Set pFolder = pOLA.GetDefaultFolder(olFolderInfrared) pFolder.AddItemToInfraredFolder olTaskItem, pTaskItem pFolder.SendToInfrared Set pFolder = Nothing Set pTaskItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li> <li>How to receive items through Infrared transfer

This sample receives a TaskItem sent through Infrared transfer. <ol> <li>Create a new Windows CE Project in eMbedded Visual Basic. Form1 is created by default.</li> <li>Add a CommandButton control to Form1.</li> <li> Paste the following code into Form1: Option Explicit Dim pOLA As PocketOutlook.Application Dim pFolder As PocketOutlook.Folder Dim pItems As PocketOutlook.Items Dim pTaskItem As PocketOutlook.TaskItem Const olFolderTasks = 13

Private Sub Form_Load Set pOLA = CreateObject(&quot;PocketOutlook.Application&quot;) pOLA.Logon (Form1.hWnd) End Sub

Private Sub Command1_Click 'Get the task from Infrared transfer Set pFolder = pOLA.GetDefaultFolder(olFolderTasks) Set pItems = pFolder.ReceiveFromInfrared 'Verify we got it   Set pTaskItem = pItems.Item(1) MsgBox pTaskItem.Subject, vbCritical, &quot;Task Received!&quot; Set pFolder = Nothing Set pItems = Nothing Set pTaskItem = Nothing End Sub

Private Sub Form_Unload(Cancel As Integer) pOLA.Logoff Set pOLA = Nothing End Sub </li></ol> </li></ul> </li></ol>

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

<div class="references_section">