DistListItem.DownloadState property (Outlook)
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 DistListItem object.
Example
The following Microsoft 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.
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
See also
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기