Solved

Insert PDF as page 2 on a report

Posted on 2014-01-30
2
431 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
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 500 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now