[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

Insert PDF as page 2 on a report

I have a 2 page report.  On page 2 I want to insert a PDF file.  Can this be done?
0
SteveL13
Asked:
SteveL13
1 Solution
 
GozrehCommented:
You can insert an Unbound object into your report and select your Adobe file.
But you will only see the first page, with other limitations.

Best option will be to send your report to pdf, and combine it with your second pdf file.
0
 
SarahDaisy8Commented:
I used this code to merge two PDF's from 2 reports into one PDF. You can modify the numpages to be 2 (test it out) to make sure it goes in between it's pages.  Don't forget to add the Acrobat (not sure of the exact title) reference so that it recognizes the object you are calling.  


Public Function Combine(FileSave As String, summary As String, Detail As String)
Dim AcroApp As Acrobat.AcroApp
Dim SumfileName As Acrobat.CAcroPDDoc
Dim detailfileName As Acrobat.CAcroPDDoc
Dim numPages As Integer
Set AcroApp = CreateObject("AcroExch.App")
Set SumfileName = CreateObject("AcroExch.PDDoc")
Set detailfileName = CreateObject("AcroExch.PDDoc")
SumfileName.Open (summary) 'Page 1 File directory location
detailfileName.Open (Detail) 'Page 2 file directory location


'COMBINES MULTIPLE PDF PAGES INTO ONE PDF FILE


' Insert the pages of Part2 after the end of Part1
numPages = SumfileName.GetNumPages()
If SumfileName.InsertPages(numPages - 1, detailfileName, 0, detailfileName.GetNumPages(), True) = False Then
MsgBox "Cannot insert pages"
End If

If SumfileName.Save(PDSaveFull, FileSave) = False Then
MsgBox "Cannot save the modified document"
End If

SumfileName.Close
detailfileName.Close
AcroApp.Exit
Set AcroApp = Nothing
Set SumfileName = Nothing
Set detailfileName = Nothing

End Function

Open in new window


Sarah
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now