1

交換サーバーから電子メールを取得する必要があるプログラムがあります。私は古いプロジェクトからこれを得ました:

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ステートメントが緑色の下線付きになり、参照が存在しないか、パブリックメンバーがないことを示します...

何が起こっているか知っている人はいますか?

4

1 に答える 1

1

大丈夫、

最終的には、それがターゲット フレームワークでした。

これはうまくいった:http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/26f1a426-f42d-4bab-8245-1a77c3f09251

于 2012-04-27T20:01:01.327 に答える