• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

MenuItemExecute("Scan") doesn't work with Acrobat 2017

New Here ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

I've used the following code in VBA for years since Acrobat 9.  I had a new user of the application that had Acrobat 2017 Standard installed and it doesn't run the scan command.

Set gpdfApp = CreateObject("AcroExch.App")

gpdfApp.MenuItemExecute("Scan")

I did some debugging and I could make the MenuItemExecute("Scan") work if I opened a document in Acrobat first but it doesn't seem to work right when Acrobat launches.

Is there any code I could add/change to make this work for me?

TOPICS
Acrobat SDK and JavaScript

Views

973

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

That’s a very old menu name – you should be using the modern names in the modern versions of the app

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

If one of the newer names would work I'm all for it.  I've looked high and low for a document that lists all the menu names.  Can you direct me to the list?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

You can get the list yourself using app.listMenuItems() in the JS console when running the app

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

Unfortunately, I'm a VBA guy not a JS guy.  Is there not a way to provide me at least a screenshot?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

Screen shot of what? The list of menu items is VERY long…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

You don't have to be familiar with JavaScript to execute this one command. Take a look here for how you can execute code in the JavaScript console:

https://acrobatusers.com/tutorials/javascript_console

However, I don't think you will find anything besides the menu item named "Scan" - lrosenth​, here is the relevant section from the output of app.listMenuItems():

[cName:ScreenCapture_Screen]

[cName:ScreenCapture_Window]

[cName:ScreenCapture_Selection]

[cName:Scan]

[cName:Web2PDF:OpnURL]

[cName:ImageConversion:Clipboard]

[cName:]

As you can see, "Scan" is in the portion that lists menu item in the File menu. If you know of any other method that would bring up the scan interface, please let us know (I searched for "scan" in the output, and the above item is the only one I found).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

I did figure out how to use the JavaScript console...sorry for the ignorance on my part.

I have Acrobat 10 on my machine and it has what you displayed.  I'll need to run it on my client's machine to see if the list is any different in Acrobat 2017.  As stated previously, I can make the Scan menu work, it just won't work with Acrobat right after it launches, which is where this code I run has always worked. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

LATEST

The lines I pasted are from Acrobat Pro DC (the current 2017 version). The scan "dialog" will be different (there is no dialog that pops up anymore, it's now a tool that takes up the whole Acrobat window).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines