편집

다음을 통해 공유


Folder.Items property (Outlook)

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

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

Folder Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.