VB .NET Microsoft.Exchange.WebServices.Data任务-类-查找BillingInformation&电子邮件的里程值-语法 [英] VB .NET Microsoft.Exchange.WebServices.Data Task - Class - Find BillingInformation & Mileage value from Email - Syntax
问题描述
获取错误:服务(EmailMessage)返回的项目类型与请求的项目类型(任务)不兼容.
我正在尝试查找的值:
Dim value As String
Dim service1 As ExchangeService = New
ExchangeService(ExchangeVersion.Exchange2013, easternZone)
service1.Credentials = New WebCredentials(UserID, Password)
service1.Url = New Uri("https://outlook.office365.com/EWS/Exchange.asmx")
Dim findResults As FindItemsResults(Of Item) = service1.FindItems(folderID1, unReadFilter, New ItemView(50))
For Each item As Item In findResults
Dim val = item.Id.ToString()
mytask1 = Task.Bind(service1, val)
value = mytask1.Mileage.ToString() Next
这是通过Exchange .WebServices通过电子邮件发送的.数据类. 当我们向电子邮件属性添加值时,例如 村庄"或账单信息"-我们可以找到这些.
我收到以下错误:
- ex {"The item type returned by the service (EmailMessage) isn't compatible with the requested item type (Task)."} System.Exception {Microsoft.Exchange.WebServices.Data.ServiceLocalException}
我正在使用Microsoft文档中的引用来编写代码:
@ Glen,请在下面找到错误屏幕截图: 在尝试使用扩展属性定义时出现错误
Gets error : The item type returned by the service (EmailMessage) isn't compatible with the requested item type (Task).
I'm trying to find the value of :
Dim value As String
Dim service1 As ExchangeService = New
ExchangeService(ExchangeVersion.Exchange2013, easternZone)
service1.Credentials = New WebCredentials(UserID, Password)
service1.Url = New Uri("https://outlook.office365.com/EWS/Exchange.asmx")
Dim findResults As FindItemsResults(Of Item) = service1.FindItems(folderID1, unReadFilter, New ItemView(50))
For Each item As Item In findResults
Dim val = item.Id.ToString()
mytask1 = Task.Bind(service1, val)
value = mytask1.Mileage.ToString() Next
this is from an Email message through Exchange .WebServices. Data class . when we add values to Email attributes like "Millage " or "Billing information" - we can find these available .
I get the below error :
- ex {"The item type returned by the service (EmailMessage) isn't compatible with the requested item type (Task)."} System.Exception {Microsoft.Exchange.WebServices.Data.ServiceLocalException}
I'm using the references from Microsoft docs to make the code :
- Any help is extremely appreciated - I'm stuck from last couple of days .
- I'm a beginner to Exchange Service class . error screenshot
@ Glen please find the error screenshot below : Gets Error when trying to use extended properties definition
这篇关于VB .NET Microsoft.Exchange.WebServices.Data任务-类-查找BillingInformation&电子邮件的里程值-语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!