Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method is not supported in Windows CE Platform Builder 3.0.
This method creates and returns a pointer to a 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. This parameter can be one of the following: olAppointmentItem, olContactItem, olTaskItem, or olCityItem. - ppolItem
[out] Pointer to a pointer for the new item.
Return Values
S_OK indicates success. If an error occurs, the appropriate HRESULT value is returned.
Remarks
This method provides a quick method to create an item without having to get the appropriate folder first. Note that the method creates the new item in memory. You must call Save on the item to save the item to the designated collection.
Code Example [Visual Basic]
The following Visual Basic® code snippet shows how to create a new Pocket Outlook city item:
Sub CreateAnItem(polApp As PocketOutlook.Application)
Dim polCity As PocketOutlook.CityItem
Set polCity = polApp.CreateItem(olCityItem)
End Sub
Code Example [C++]
The following C++ code snippet shows how to create a new Pocket Outlook city item:
void CreateAnItem(IPOutlookApp *polApp)
{
ICity *pCity;
polApp->CreateItem(olCityItem, (IDispatch **) &pCity);
pCity->Release();
}
Requirements
| Runs On | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | pimstore.h |
See Also
IPOutlookApp::Unknown, IPOutlookApp Property Methods
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.