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

VBA ReplacePages Method Fails after new Acrobat Pro Install

New Here ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

I have a macro that opens 2 pdf's and replaces pages from one with the pages from the other. It was working before I moved to a new computer. Both computers are running Acrobat Pro -- but the older one was using 2017 version, and the new one is using the newest Acrobat pro subscription license.

 

Is there something that's changed that would make this method now fail?

 

        If Doc1.ReplacePages(Doc1.GetNumPages - 7, Doc2, 0, Doc2.GetNumPages, 1) = False  Then
            MsgBox "Cannot replace pages"
            Exit Sub
        End If

 

My code executes fine - but now returns "FALSE" but previously was working fine.

 

Thanks!

TOPICS
Acrobat SDK and JavaScript

Views

32

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
LEGEND ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

Are you able to do the insertion manually on those exact files (using Organise pages or drag and drop of thumbnails). The first thing is to verify that it isn't a problem with the files.

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 ,
Oct 26, 2022 Oct 26, 2022

Copy link to clipboard

Copied

LATEST

Hi, thanks for responding. Yes, I am able to manually do that.

 

Also FYI - I checked the reference libraries in VBA that are enabled & have Adobe 10.0 Type Library enabled, and also added Acrobat Access 3.0 Type Library for good measure. No luck. 

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