मेरे वीएसटीओ आउटलुक एडिन में मैं एक बटन डालने की कोशिश कर रहा हूं जो एक फ़ोल्डर पर राइट क्लिक करते समय दिखाई देगा। मेरी स्टार्टअप समारोह में मैं इस है:सी # (आउटलुक ऐड-इन) संदर्भ मेनू
Outlook.Application myApp = new Outlook.ApplicationClass();
myApp.FolderContextMenuDisplay += new ApplicationEvents_11_FolderContextMenuDisplayEventHandler(myApp_FolderContextMenuDisplay);
तो मैं उस के लिए हैंडलर है ...
void myApp_FolderContextMenuDisplay(CommandBar commandBar, MAPIFolder Folder)
{
var contextButton = commandBar.Controls.Add(MsoControlType.msoControlButton, missing, missing, missing, true) as CommandBarButton;
contextButton.Visible = true;
contextButton.Caption = "some caption...";
contextButton.Click += new _CommandBarButtonEvents_ClickEventHandler(contextButton_Click);
}
और अंत में क्लिक के लिए हैंडलर ....
void contextButton_Click(CommandBarButton Ctrl, ref bool CancelDefault)
{
//stuff here
}
मेरे प्रश्न यह है कि मैं MAPIFolder Folder
myApp_FolderContextMenuDisplay
से contextButton_Click
पर कैसे भेजूं?
(यह एक और तरीका है किया जा सकता है, तो मैं भी सुझाव के लिए खुला रहा हूँ)