Export (0) Print
Expand All

Folder.Items Property

Office 2007
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.

Example

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

Visual Basic for Applications
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



Community Additions

ADD
Show:
© 2014 Microsoft