Solved

Insert PDF as page 2 on a report

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

690 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