all,
below is code i use, hope it helps. i have the "Acrobat Adobe 8.0 Type
library" reference. i figure it should work in earlier versions but doubt
you can reference the library if you just have PDF viewer. the save file can
be the same as the orginal, i have also looped this type of code.
Function PDF_Combine_Final()
Dim AcroExchApp As Acrobat.CAcroApp
Dim AcroExchPDDoc As Acrobat.CAcroPDDoc
Dim AcroExchInsertPDDoc As Acrobat.CAcroPDDoc
Dim strFileName As String, strPath As String
Dim iNumberOfPagesToInsert As Integer
Dim iLastPage As Integer
Set AcroExchApp = CreateObject("AcroExch.App")
Set AcroExchPDDoc = CreateObject("AcroExch.PDDoc")
strFileName = "C:\OriginalFile.pdf"
AcroExchPDDoc.Open (strFileName)
iLastPage = AcroExchPDDoc.GetNumPages - 1
Set AcroExchInsertPDDoc = CreateObject("AcroExch.PDDoc")
AcroExchInsertPDDoc.Open ("C:\FileToInsert.pdf")
iNumberOfPagesToInsert = AcroExchInsertPDDoc.GetNumPages
AcroExchPDDoc.InsertPages iLastPage, AcroExchInsertPDDoc, 0,
iNumberOfPagesToInsert, 0
AcroExchInsertPDDoc.Close
PDF_Combine_Final_Exit:
AcroExchPDDoc.Save 1, "C:\NewFile.pdf"
AcroExchApp.Exit
Exit Function
End Function