IPOutlookItemCollection::Item
This method is not supported in Windows CE Platform Builder 3.0.
This method retrieves an item from a folder. It retrieves the item based on the current sort order.
HRESULT Item( int iItem, IDispatch ** ppolItem );
Parameters
- iItem
[in] The one-based index for the item that you want to retrieve. The index refers to the position of the item in the current sort order. - ppolItem
[out] Point to a pointer to the retrieved item.
Return Values
S_OK indicates success. If an error occurs, the appropriate HRESULT value is returned.
Remarks
Code Example [Visual Basic]
The following Visual Basic® code snippet shows how to get an item from an Items collection:
Sub GetAnItem(polApp As PocketOutlook.Application)
Dim polTask As PocketOutook.TaskItem
Set polTasks = polApp.GetDefaultFolder(olFolderTasks).Items
Set polTask = polTasks.Get(5)
' Do something with the task here
' ...
End Sub
Code Example [C++]
The following C++ code snippet shows how to get an item from an Items collection:
void GetAnItem(IPOutlookApp *polApp)
{
IPOutlookItemCollection *pItems;
ITask *pTask;
// Get the fifth item in the tasks folder
polApp->GetDefaultFolder(olFolderTasks, &pFolder)
pFolder->get_Items(&pItems);
pItems->get(5, &pTask)
// Do something with the task here
// ...
// Release objects
pItems->Release();
pTask->Release();
}
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | pimstore.h |
See Also
IPOutlookItemCollection::Unknown, IPOutlookItemCollection Property Methods
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.