Propriedade AppointmentItem. Downloadstate (Outlook)AppointmentItem.DownloadState property (Outlook)
Retorna uma constante que pertence à enumeração OlDownloadState , indicando o estado de download do item.Returns a constant that belongs to the OlDownloadState enumeration indicating the download state of the item. Somente leitura.Read-only.
SintaxeSyntax
expression.expression. DownloadState
expressão Uma variável que representa um objeto AppointmentItem .expression A variable that represents an AppointmentItem object.
ExemploExample
O exemplo do Microsoft Visual Basic for Applications (VBA) a seguir pesquisa na caixa de entrada do usuário itens que ainda não foram totalmente baixados.The following Microsoft Visual Basic for Applications (VBA) example searches through the user's Inbox for items that have not yet been fully downloaded. Se for localizado algum item com download ainda incompleto, será exibida uma mensagem para o usuário e o item será marcado para download.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
Confira tambémSee also
Objeto AppointmentItemAppointmentItem Object
Suporte e comentáriosSupport and feedback
Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação?Have questions or feedback about Office VBA or this documentation? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.