Skip to main content
Known Participant
January 6, 2017
Question

MenuItemExecute("Annots:TextEditMenu:HighlightSel") is not working

  • January 6, 2017
  • 1 reply
  • 2099 views

Hello,

I am using IAC OLE automation APIs for inter-application communication with PDF document.

I want to execute "Highlight text" menu item programmatically using MenuItemExecute("Annots:TextEditMenu:HighlightSel"), however its not working.

I checked whether this menu item is enabled or not using MenuItemIsEnabled("Annots:TextEditMenu:HighlightSel").

Its returning -1. And as per documentation(http://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FIAC_API_OLE_Objects%2FMenuItemIsEnabled.htm), It means that menu is enabled.

However, whenever I execute the function MenuItemExecute("Annots:TextEditMenu:HighlightSel"), It gives me following error:

"Attempt to call a method that has not been implemented"

I am putting my code snippet here:

CAcroApp *m_pAcroApp;

COleException e;

m_pAcroApp = new CAcroApp;

m_pAcroApp->CreateDispatch("AcroExch.App", &e);

m_pAcroApp->MenuItemExecute("Annots:TextEditMenu:HighlightSel");

Product details that I am using are:

Acrobat version : Acrobat Pro DC (Classic-Acrobat2015)

SDK: Acrobat DC SDK

Operating system: Windows 7

IDE: Microsoft Visual studio 2013

Please help.

Thank you in advance!

Regards,

Navnath.

This topic has been closed for replies.

1 reply

Karl Heinz  Kremer
Community Expert
Community Expert
January 6, 2017

If I remember correctly, this was a valid menu item to execute back in Acrobat 9 - before the user interface was dramatically changed in Acrobat X and then again in DC. There is no such menu item anymore in Acrobat DC. You can list the names of all menu items using the JavaScript app.listMenuItems() method (see here for more information: Acrobat DC SDK Documentation - app.listMenuItems()

try67
Community Expert
Community Expert
January 8, 2017

It works in Acrobat XI...