?
Solved

Insert PDF as page 2 on a report

Posted on 2014-01-30
2
Medium Priority
?
436 Views
Last Modified: 2014-02-01
I have a 2 page report.  On page 2 I want to insert a PDF file.  Can this be done?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Expert Comment

by:Gozreh
ID: 39820855
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
 
LVL 1

Accepted Solution

by:
SarahDaisy8 earned 2000 total points
ID: 39822557
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question