1
任何人都可以幫助我得到打開的Outlook項目窗口的第一個標籤idMso值?我需要動態設置它在功能區xml文件中,因爲我發現將每個項目窗口添加到xml代碼中是多餘的。如果任何人有現有的解決方案來共享,那就太好了。使用VS2010在.NET中進行Outlook 2007功能區自定義; insertBeforeMso動態功能
感謝
任何人都可以幫助我得到打開的Outlook項目窗口的第一個標籤idMso值?我需要動態設置它在功能區xml文件中,因爲我發現將每個項目窗口添加到xml代碼中是多餘的。如果任何人有現有的解決方案來共享,那就太好了。使用VS2010在.NET中進行Outlook 2007功能區自定義; insertBeforeMso動態功能
感謝
解決它:)
剛從GetCustomUI上運行時修改返回的字符串,但陷阱探險項目第一
Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office.IRibbonExtensibility.GetCustomUI
Dim strResText As String = ""
Dim strGetRes As String = ""
Select Case ribbonID
Case "Microsoft.Outlook.Appointment"
strGetRes = GetResourceText("OutlookAddIn.Ribbon1.xml")
strResText = strGetRes.Replace("TabNewMailMessage", "TabAppointment") 'default value of it is TabNewMailMessage
Case Else
strResText = GetResourceText("OutlookAddIn.Ribbon1.xml")
End Select
Return strResText
End Function
原始XML字符串:
<tab id="customTab" label="myCustomTab" insertBeforeMso="TabNewMailMessage" visible="true">
約會項目窗口上的新XML字符串:
<tab id="customTab" label="myCustomTab" insertBeforeMso="TabAppointment" visible="true">
此刻依然空手而歸。我使用Ribbon XML和VB.net,這使得在運行時無法編輯功能區;在這裏找到了這個想法http://stackoverflow.com/questions/5780063/is-there-a-way-to-access-a-ribbon-xml-at-run-time – kmanxi