Hi,
bei einem Outlook 2010 Addin habe ich aktuell ein Problem im Zusammenhang mit im OnAction Fall bei einem ContextMenuFolder-Item.
Ich füge in das Kontextmenü von Outlook-Ordnern einen neuen Menüpunkt ein.
Nun habe ich das Problem, dass ich z.Z. keine Ahnung habe (googeln bachte mich auch nicht weiter), wie ich im OnAction-Fall den Ordner ermitteln kann, auf dem das Kontextmenü geöffnet wurde.
Die Callback Funktion...
...funktioniert tadellos, aber wie komme ich an das Folder-Object auf dem rechtsgeklickt wurde?
P.S:
Ist es schon mal nicht, weil sich die Selection z.B. nicht ändert, wenn ich rechts auf einen Ordner klicke, der vorher noch nicht gewählt war (linksgeklickt wurde).
bei einem Outlook 2010 Addin habe ich aktuell ein Problem im Zusammenhang mit im OnAction Fall bei einem ContextMenuFolder-Item.
Ich füge in das Kontextmenü von Outlook-Ordnern einen neuen Menüpunkt ein.
Code:
<?xml version="1.0" encoding="UTF-8"?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> . . . <contextMenus> <contextMenu idMso="ContextMenuFolder"> <menuSeparator id="SeparatorBeforeCreateSnapshot"/> <button id="ContextMenu_CreateSnapshot" label="Create Snapshot" onAction="CreateSnapshot" enabled="true" visible="true" getImage="Ribbon_GetImage"/> </contextMenu> </contextMenus> </customUI>
Die Callback Funktion...
Code:
public void CreateSnapshot(Office.IRibbonControl control) { MessageBox.Show("Test", "Test", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); }
P.S:
Code:
Globals.ThisAddIn.Application.ActiveExplorer().Selection[1].Parent