Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

ContactItem.DownloadState Property

Office 2007
Returns a constant that belongs to the OlDownloadState enumeration indicating the download state of the item. Read-only.

Syntax

expression.DownloadState

expression   A variable that represents a ContactItem object.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example searches through the user's Inbox for items that have not yet been fully downloaded. If any not yet fully downloaded items are found, a message is displayed to the user, and the item is marked for download.

Visual Basic for Applications
Sub DownloadItems()
    Dim mpfInbox As Outlook.Folder
    Dim objItems As Outlook.Items
    Dim obj As Object
    Dim i As Integer
    Dim iCount As Integer

    Set mpfInbox = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
    Set objItems = mpfInbox.Items
    iCount = objItems.Count
    'Loop all items in the Inbox folder
    For i = 1 To iCount
        Set obj = objItems.Item(i)
        'Verify if the state of the item is olHeaderOnly
        If obj.DownloadState = olHeaderOnly Then
            MsgBox "This item has not been fully downloaded."
            'Mark the item to be downloaded
            obj.MarkForDownload = olMarkedForDownload
            obj.Save
        End If
    Next
End Sub



Community Additions

ADD
Show:
© 2015 Microsoft