ContactItem 属性 (Outlook)ContactItem.MarkForDownload property (Outlook)

返回或设置一个**OlRemoteStatus** 常量, 该常量确定某个项目在由远程用户接收后的状态。Returns or sets an OlRemoteStatus constant that determines the status of an item once it is received by a remote user. 读/写。Read/write.


expressionexpression. MarkForDownload

_表达式_一个代表ContactItem对象的变量。expression A variable that represents a ContactItem object.


利用此属性,数据传输能力较弱的远程用户可以更加灵活地进行邮件收发。This property gives remote users with less-than-ideal data-transfer capabilities increased messaging flexibility.


下面的示例在用户的 "收件箱" 中搜索尚未完全下载的项目。The following example searches through the user's Inbox for items that have not yet been fully downloaded. 如果找到此类项目,将向用户显示一条消息,并将该项目标记为下载。If any items are found that are not fully downloaded, a message is displayed and the item is marked for download.

Sub DownloadItems() 
 Dim mpfInbox As Outlook.Folder 
 Dim obj As Object 
 Dim i As Integer 
 Set mpfInbox = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox) 
 'Loop all items in the Inbox folder 
 For i = 1 To mpfInbox.Items.Count 
 Set obj = mpfInbox.Items.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 
 End If 
End Sub

另请参阅See also

创建 ContactItem 对象ContactItem Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.