PDSaveFull Problem
Hi, Can someone help please? I'm new to using the Acrobat SDK. I'm using Acrobat Pro DC.
I'm using VBA in a MS Access database and have the Adobe Acrobat 10.0 Type Library loaded.
The code I have pasted below runs and works as it should do: The pdf called Test02 is appended to Test01 and the modified Test01 is saved as WorksOK.
The problem I have is that I would like to overwrtie the orignal Test01 file with the modified version. I've tried changing the If statement near the bottom of my code to "If Doc01.Save(PDSaveFull, "C:\temp\Test01.pdf") = False Then" but the result is False and nothing is saved.
Thank you
Sub PDFtest()
Dim AcroApp As Acrobat.CAcroApp
Dim Doc01 As Acrobat.CAcroPDDoc
Dim Doc02 As Acrobat.CAcroPDDoc
Set AcroApp = CreateObject("AcroExch.App")
Set Doc01 = CreateObject("AcroExch.PDDoc")
Set Doc02 = CreateObject("AcroExch.PDDoc")
Doc01.Open ("C:\temp\Test01.pdf") 'Source file
Doc02.Open ("C:\temp\Test02.pdf") 'Destination file
If Doc01.InsertPages(0, Doc02, 0, 1, False) = False Then
MsgBox "Cannot insert page"
Exit Sub
End If
If Doc01.Save(PDSaveFull, "C:\temp\WorksOK.pdf") = False Then
MsgBox "Cannot save the modified document"
End If
Doc01.Close
Doc02.Close
AcroApp.Exit
Set AcroApp = Nothing
Set Doc01 = Nothing
Set Doc02 = Nothing
End Sub
