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

VBA ReplacePages Method Fails

New Here ,
Mar 27, 2023 Mar 27, 2023

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.But impossible to obtain a good result. The first PDF don't have the replaced page after save.

 

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

I don't understand why the ReplacePage commande no longer works...

TOPICS
Acrobat SDK and JavaScript , Windows

Views

263

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

correct answers 1 Correct answer

LEGEND , Mar 27, 2023 Mar 27, 2023

1. You say it no longer works. When did ir work, and what changed?

2. Do you see the files open and close, or was it invisible anyway?

3. Does the update date change in the "saved" file?

4. Do you check the files open correctly? 
5. Please show the open and save code. 

Votes

Translate

Translate
LEGEND ,
Mar 27, 2023 Mar 27, 2023

Copy link to clipboard

Copied

1. You say it no longer works. When did ir work, and what changed?

2. Do you see the files open and close, or was it invisible anyway?

3. Does the update date change in the "saved" file?

4. Do you check the files open correctly? 
5. Please show the open and save code. 

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 ,
Mar 27, 2023 Mar 27, 2023

Copy link to clipboard

Copied

LATEST

Hi Test Screen, 4 was the wrong way. I forgot to put ".pdf" extendsion on Doc2... So now it works perfectly.

Regards.

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