原創|其它|編輯:郝浩|2012-10-23 09:45:22.000|閱讀 549 次
概述:OFFICE 2013近日發布,在其中的Outlook 2013中推出了一種我們稱為內聯響應(inline response)的新功能。Add-in Express for Microsoft Office and .net可以實現這一功能。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
OFFICE 2013近日發布,在其中的Outlook 2013中推出了一種我們稱為內聯響應(inline response)的新功能。它是指,當您點擊Outlook 2013功能區上的某些按鈕時,不彈出新的窗口,直接在閱讀窗格中響應該按鈕對應的指令。
例如,點擊Outlook中的答復按鈕時,在2010及其以前版本中,將會彈出郵件編輯窗口,這種過多運用彈窗的解決方案,明顯不適合WIN8的METRO設計準則,也不適用于跨設備的應用程序。Outlook 2013則直接在閱讀窗格中,將回復郵件轉化為可編輯狀態,如下圖所示:
要如何實現這一跨設備應用程序應該擁有的新功能呢?使用Add-in Express for Microsoft Office and .net 中Context.TabComposeTools便可以完成。以下為示例代碼:
private void DisplayInlineResponseSubject(Outlook._Application OutlookApp) { Outlook.Explorer explorer = null; Outlook.MailItem response = null; try { explorer = OutlookApp.ActiveExplorer(); // response = explorer.ActiveInlineResponse; response = explorer.GetType().InvokeMember("ActiveInlineResponse", System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public, null, explorer, null) as Outlook.MailItem; if (response != null) System.Windows.Forms.MessageBox.Show(response.Subject, "The inline response e-mail's subject"); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message, "An exception was thrown in the code..."); } finally { if (response != null) Marshal.ReleaseComObject(response); if (explorer != null) Marshal.ReleaseComObject(explorer); } }
完成效果如下圖:
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網