Partager via


Folder.Items Property (Outlook)

Returns an Items collection object as a collection of Outlook items in the specified folder. Read-only.

Version Information

Version Added: Outlook 2007

Syntax

expression .Items

expression A variable that represents a Folder object.

Remarks

The index for the Items collection starts at 1, and the items in the Items collection object are not guaranteed to be in any particular order.

Example

This Visual Basic for Applications (VBA) example uses the Items property to obtain the collection of ContactItem objects from the default Contacts folder.

Sub ContactDateCheck() 
 
 Dim myNamespace As Outlook.NameSpace 
 
 Dim myContacts As Outlook.Items 
 
 Dim myItems As Outlook.Items 
 
 Dim myItem As Object 
 
 
 
 Set myNamespace = Application.GetNamespace("MAPI") 
 
 Set myContacts = myNamespace.GetDefaultFolder(olFolderContacts).Items 
 
 Set myItems = myContacts.Restrict("[LastModificationTime] > '01/1/2003'") 
 
 For Each myItem In myItems 
 
 If (myItem.Class = olContact) Then 
 
 MsgBox myItem.FullName & ": " & myItem.LastModificationTime 
 
 End If 
 
 Next 
 
End Sub

See Also

Concepts

Folder Object

Folder Object Members