Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

The CreateItem method creates and gets a POOM item. The item is created in the default folder for the specified type.

HRESULT CreateItem(
  int olItem,
   IDispatch ** ppolItem


[in] PIM item type to create. One of the OlItemType enumeration values.


[out] Reference to the new item. For information about IDispatch, see IDispatch.

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:


The method completed successfully.

The following code example shows how to create a new POOM Contact item.

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
void CreateAnItem(IPOutlookApp * polApp)
    IContact * pContact;

    polApp->CreateItem(olContactItem, (IDispatch**)&pContact);


This method creates an item without having to first retrieve the appropriate folder. The new item is created in memory. You must save the item to the designated collection.

Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2000 and later, Smartphone 2002 and later

Community Additions

© 2015 Microsoft