Compartir a través de


IPOutlookApp::CreateItem (Windows CE 5.0)

Send Feedback

This method creates and returns a pointer to an Pocket Outlook item. The item is created in the default folder for the specified type.

HRESULT CreateItem(int olItem,IDispatch** ppolItem);

Parameters

  • olItem
    [in] Specifies which item to create: olAppointmentItem, olContactItem, olTaskItem.
  • ppolItem
    [out] Pointer to the new item.

Return Values

S_OK indicates success. If an error occurs, the appropriate HRESULT is returned.

Remarks

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

Example

The following code example shows how to create a new Pocket Outlook contact item.

void CreateAnItem (IPOutlookApp *polApp)
{
  IContact *pContact;
  polApp->CreateItem (olContactItem, (IDispatch**)&pContact);  pContact->Release ();}

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Pimstore.h.
Link Library: Pimstore.lib.

See Also

IPOutlookApp | IPOutlookApp Properties

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.