2015-07-02 38 views
0

Screen Shot試圖使用贖回

我試圖在屏幕截圖上面描繪爲給定的Exchange用戶返回郵件提示(GetMailTips功能)返回郵件提示。我被困在突出顯示的智能感知部分。

這裏是我的代碼 -

// Using redemption to return mail tips 
string mailTip = ""; 
session.MAPIOBJECT = Application.Session.MAPIOBJECT; 
Redemption.RDOAddressEntry addressEntry = session.AddressBook.GAL.ResolveName("Joe Flick"); 
//Here I'm attempting to get the mail tips 
mailTip = addressEntry. // I would expect to see the GetMailTips Method/Fuction here but I don't see it 

我試圖把這種VB -

新增RDOAddressEntry.GetMailTips方法,它允許檢索外的辦公室文本,最大郵件大小等。爲Exchange郵箱。請參閱RDOMailTips對象以獲取更多信息。

set Session = CreateObject("Redemption.RDOSession") 
Session.MAPIOBJECT = Application.Session.MAPIOBJECT 
Session.SkipAutodiscoverLookupInAD = true 
set AdrEntry = Session.AddressBook.ResolveName("[email protected]") 
set mailTips = AdrEntry.GetMailTips("[email protected]", "<My Password>")  optional authentication parameters for EWS 
MsgBox mailTips.MaxMessageSize 

Detailed here -

我似乎無法得到正確的語法下來,評論在上面的代碼,但可以解決對GAL精細的用戶名。任何幫助表示讚賞。 在此先感謝!

![Visual Studio的屏幕截圖] [3]在救贖的5.9版本(上週發佈)加入

+0

你對'set'的使用看起來對於VB.NET來說是可疑的......不應該把它變成暗淡的(假設變量不存在,並且你試圖在同一個語句中創建和初始化)? – kaveman

+0

也 - 問題到底是什麼?你是否收到語法錯誤?這是不完全清楚你在問什麼?如何將C#轉換爲VB?或如何使用Mailtips? – kaveman

+0

對不起,編輯後添加sceenshot –

回答

1

好的,我從dimastr.com下載評估.dll後,便能夠返回Mailtips。我的目標是檢查會議室是否受到限制。

Redemption.RDOSession session = new Redemption.RDOSession(); 
session.MAPIOBJECT = Application.Session.MAPIOBJECT; 
Redemption.RDOAddressEntry addressEntry = session.AddressBook.GAL.ResolveName("User Name From the GAL"); 
try 
{ 
Redemption.RDOMailTips mailtips = addressEntry.GetMailTips(); 
MessageBox.Show(mailtips.DeliveryRestricted.ToString()); 
MessageBox.Show(mailtips.CustomMailTip.ToString()); 
} 
catch (NullReferenceException ex) 
{ 
MessageBox.Show(ex.ToString()); 
} 
1

RDOAddressEntry.GetMailTips。你使用什麼版本?你是否重新創建了VS項目中的Redemption參考,以確保interop dll被重新生成?

+0

好吧,這使得感覺...謝謝我們正在運行一個較舊的版本 –