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...
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.
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.
Copy link to clipboard
Copied
Hi Test Screen, 4 was the wrong way. I forgot to put ".pdf" extendsion on Doc2... So now it works perfectly.
Regards.