Results 1 to 7 of 7
  1. #1
    alpruett is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    3

    Print linked pdfs within an Access Report

    I have a linked pdf file associated with each record in my database. I would like to create a report that would show the data from the access record, then the pdf linked to that record, then the data for the next record, and so on. Is this even possible?

  2. #2
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    of course it's possible. HOW is it linked?? is it an OLE field or a hyperlink field?? If it's a HLINK, then obviously you just include that field in your field list of the report.

  3. #3
    alpruett is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    3
    It's via a hyperlink field. When I add the hyperlinked field to my report, it simply creates a report with the hyperlink intact. I want the actual document to be reproduced in the report when I print that report to a pdf. Am I missing something obvious?

  4. #4
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by alpruett View Post
    I want the actual document to be reproduced in the report when I print that report to a pdf.
    so you want to push a print button and print the actual PDF document?? if that's what you want, why would you print the report too??

    It sounds to me like you're confusing the "print to PDF" export option. That does NOT, by default, print anything but the report object in PDF form. Make sense?? So what you can only get with that is what you're seeing on the screen. the rpt with a bunch of underlined blue hyperlinks on it.

    what I think you should do is put a button on your report that runs the vba code to print the document behind the hyperlink. It's only a couple of lines, or should be...

    Make sense so far??

  5. #5
    alpruett is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    3
    The reason for the report too is that the reports are from queries that will pull certain types of files. My supervisor wants to be able to open a report, hit print to pdf, and have only the files that result from a particular query. She would also like the query report to print because it includes some details about each document.

    I have not encountered adding a button to run a vba code to print the doc behind the hyperlink, but it sounds like what I need. Can you explain the steps and code to make this happen? Please bear with me as I'm very much a novice. I've become fairly proficient at basic Access, but rarely have ventured into the world of VBA.

  6. #6
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    OK, so basically you've answered your own question with this:

    My supervisor wants to be able to open a report, hit print to pdf, and have only the files that result from a particular query. She would also like the query report to print because it includes some details about each document.
    so you need the rpt for info, and you need the PDF's for the content. if you wanna do it urself, start here: http://www.google.com/search?sclient...7&pf=p&pdl=300

    concepts like printing files in folders from vba code are asked by people all over the world. thus, you don't have to think of a specific search phrase in google. almost anything will give an answer that's viable.

    as far as the code writing, ur welcome to upload something here and I'll give u a sample of code that u'll need to use for looping data. that's the bulk of the coding for printing files.

  7. #7
    NoellaG's Avatar
    NoellaG is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    636
    Hi all,

    I didn't try it myself, but if you have a hyperlink, this object has the property "Address".
    If you add a bound object frame to your report, and set the OLE class to "Adobe Acrobat 8.0" (or your version) and set the source doc to the hyperlink address, it just might work.

    here is a snippet code from the help files with an example how to set the properties of an object frame:

    Code:
    Sub Command1_Click      
    OLE1.Class = "Excel.Sheet"    
    ' Set class name.      
    ' Specify type of object.     
     OLE1.OLETypeAllowed = acOLELinked      
    ' Specify source file.      
    OLE1.SourceDoc = "C:\Excel\Oletext.xls"      
    ' Specify data to create link to.      
    OLE1.SourceItem = "R1C1:R5C5"      
    ' Create linked object.      
    OLE1.Action = acOLECreateLink      
    ' Adjust control size.      
    OLE1.SizeMode = acOLESizeZoom  
    End Sub
    Hope you find something, and if so I'm very interested to know. Success

    NG

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Print Linked Images in a Report
    By bosve73 in forum Reports
    Replies: 4
    Last Post: 02-02-2012, 11:12 AM
  2. Replies: 0
    Last Post: 02-22-2011, 05:04 AM
  3. Print Crystal Report from Access
    By AKQTS in forum Forms
    Replies: 0
    Last Post: 07-28-2010, 03:50 PM
  4. Replies: 0
    Last Post: 03-26-2010, 09:11 AM
  5. Create PDFs from a report
    By twosides in forum Programming
    Replies: 42
    Last Post: 03-04-2010, 06:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums