Copy link to clipboard
Copied
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_...), 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.
Copy link to clipboard
Copied
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()
Copy link to clipboard
Copied
It works in Acrobat XI...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now