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

Is there any way to click OK using vba or javascript on a Acrobat dialog box?

New Here ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

Is there any way to click OK using vba or javascript on a Acrobat dialog box?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

323

Likes

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 ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

Not possible with JavaScript, and I doubt it is with VBA.

Likes

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 ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

I tried using vba sendkeys and it actually worked for a while.  I'm not sure what happened.  I can get the text recognition dialog to pop up using the following:

AcroApp.MenuItemExecute ("Cpt:CapturePages")

But it won't execute from there even though it did before.  I hate to turn this over to the user since it is so simple.  Executing this would save her a step.

Likes

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 ,
Jun 04, 2019 Jun 04, 2019

Copy link to clipboard

Copied

LATEST

This worked!

Public Function RecogText(strFilePath As String)

'**************THIS WORKS********************

'acroAppObj.MenuItemExecute ("Cpt:CapturePages")

Dim ItWorks As Boolean

Dim ctlCurrentControl As Control

Dim AcroApp As AcroApp

Dim PDDoc As AcroPDDoc

Set AcroApp = CreateObject("AcroExch.App")

Dim AVDoc As AcroAVDoc

Set AVDoc = CreateObject("AcroExch.AVDoc")

ItWorks = AVDoc.Open(strFilePath, TempName)

AcroApp.Show

Set PDDoc = CreateObject("AcroExch.PDDoc")

Set PDDoc = AVDoc.GetPDDoc

'****** SEND KEYSTROKES TO ACROBAT TO MANIPULATE OCR DIALOG BOX ******

'****** TABS take you to the 'ok' button and SendKeys sends 'ENTER' ******

SendKeys "{TAB 7}"

DoEvents

SendKeys "{ENTER}", True

AcroApp.MenuItemExecute ("Cpt:CapturePages")

PDDoc.Save 1, strFilePath

Set AcroApp = Nothing

End Function

Likes

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