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

Excel VBA code works with Acrobat XI but NOT 2017

New Here ,
Jul 12, 2018 Jul 12, 2018

Copy link to clipboard

Copied

Hi,

I have some Excel 2010 VBA code that’s been working quite well with Acrobat XI Pro.

But when I run it on a PC with Acrobat 2017 Pro, the same code crashes, right at the first step, creating the App.

Rather then post the entire spreadsheet here, this excerpt illustrates the problem. The code runs in Workbook_Open()

'-----

Option Explicit

Private Sub Workbook_Open()

    Dim OkCan As Integer

    Dim AcroApp As Acrobat.CAcroApp

    OkCan = MsgBox("About to run Set AcroApp = CreateObject(""AcroExch.App"")", vbOKCancel)

    If OkCan = vbCancel Then Exit Sub

    Set AcroApp = CreateObject("AcroExch.App")

    MsgBox ("Done")

    Set AcroApp = Nothing

End Sub

'-----

XI Pro, this works.

2017 Pro, crashes on

     Set AcroApp = CreateObject("AcroExch.App")

Run-time error '-2147467259 (80004005)'

Automation error

Unspecified error

References are set correctly, both PC's.

Excel 2010 on both PC's.

Any ideas?

Thanks in advance.

TOPICS
Acrobat SDK and JavaScript

Views

725

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
no replies

Have something to add?

Join the conversation