交換サーバーから電子メールを取得する必要があるプログラムがあります。私は古いプロジェクトからこれを得ました:
Dim oExchService As New ExchangeService(Microsoft.Exchange.WebServices.Data.ExchangeVersion.Exchange2007_SP1)
oExchService.Credentials = New Net.NetworkCredential(strUserName, strPassword, strDomain)
oExchService.Url = New Uri(strServeur)
Dim oItemView As New ItemView(1000)
oItemView.Traversal = ItemTraversal.Shallow
Dim oLstItems As FindItemsResults(Of Item) = oExchService.FindItems(WellKnownFolderName.Inbox, oItemView)
'Importation de chaque fichier
For Each oItem As Item In oLstItems
If oItem.HasAttachments Then
End If
Next
他のプロジェクトからも取得した Microsoft.Exchange.webservice.dll への参照を追加し、その参照をファイルにインポートします。すべてがうまくいっているようで、クラス内のメンバーと一緒に作業できます。コンパイルをヒットすると、importsステートメントが緑色の下線付きになり、参照が存在しないか、パブリックメンバーがないことを示します...
何が起こっているか知っている人はいますか?