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

How to late bind Acrobat object in VBA?

Explorer ,
Jan 31, 2021 Jan 31, 2021

Copy link to clipboard

Copied

The following code works perfectly in Microsoft excel VBA (Visual Basic For Applications).

Though this Early Binding version works , But if I use it in a workbook, I can not open the excel file on a machine that  Acrobat Pro is not installed.  Excel doesn't find the reference to Acrobat Pro, and all the functions stop working. I need to Late Bind the reference.

 

How can I change it to late binding?

 

Dim AcroPDDocNew    As New Acrobat.AcroPDDoc
Dim AcroPDDocAdd    As New Acrobat.AcroPDDoc
Dim lRet            As Long
    
lPages=0
lRet = AcroPDDocNew.Create()
lRet = AcroPDDocAdd.Open("E:\Test1.pdf")
lRet = AcroPDDocNew.InsertPages(lPages - 1, AcroPDDocAdd, 0, 1, True)

 

Thank you.

 

TOPICS
Windows

Views

355

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