Nilaksha Perera
Nilaksha Perera

Reputation: 725

Capture the AttachmentCotextMenuDisplay event (Outlook 2013)

I've been capturing attachment context menu for Outlook 2010 using following event which works wonderfully.

_application.AttachmentContextMenuDisplay +=new Outlook.ApplicationEvents_11_AttachmentContextMenuDisplayEventHandler(_application_AttachmentContextMenuDisplay);

But, when trying to capture the context menu for Outlook 2013 using the same way does not work as expected.

I also tried re purposing the context menu in XML as following which throws the error "Specified control type is incompatible with actual control type "context menu" per each line.

Is there a reliable way which I can capture this event in Outlook 2013 ?

<contextMenus>
<contextMenu idMso="ContextMenuAttachments">       
  <button idMso="ContextMenuAttachments" onAction="test"/>
  <toggleButton idMso="ContextMenuAttachments" onAction="test"/>
  <dynamicMenu idMso="ContextMenuAttachments" getContent="test"/>      
</contextMenu></contextMenus>

Thank you.

Upvotes: 0

Views: 183

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49453

for Outlook 2013 using the same way does not work as expected.

What code exactly did you use? Could you please be more specific? What do you mean "doesn't work"?

Anyway, to repurpose Ribbon controls you need to use the command tag. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.

The Office 2013 Help Files: Office Fluent User Interface Control Identifiers list contains all available control IDs.

Upvotes: 1

Related Questions