Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Include an external linked document in an Access Report

Posted on 2007-12-04
2
Medium Priority
?
683 Views
Last Modified: 2013-11-28
I have an existing question here to print a linked external document: http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_22960923.html

I'm dealing with Word, PDF, TIF, and PPT documents. They reside on a network share, and I have a hyperlink field that points to the physical file.  Based on the file extension, I know now to print them without having to call up the application. However, the user now wants a dynamic footer to print with each print job. Example: "this document only good for today's production run: 12/5/07". So the current date will need to be reflected. The user could also pick the option that they want to print it for training which would read "This document only good for training".

I wonder if I can create an Access report that contains a field in the footer that I can update as needed.  In the Body of the report, I place an OLE link refernce which I try to update at print time to point at the selected document. I don't have much experience with OLE links in reports, but appear to have no trouble defining an OLE link to a Word Document. Howerver, I can't do the same for the PDF, TIF or strangely enough PPT files. I get errors when trying to add the OLE linked file.

Is this a good direction to go for this problem? If so, any suggestions on how to include a link for the other file types? And more importantly, how do I update the link properties at load time?
0
Comment
Question by:Thirt
[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 16

Accepted Solution

by:
Rick_Rickards earned 2000 total points
ID: 20536454
To update the contents of any file, whether it be .pdf, .tif, .ppt or others you'll need a program that allows you to at least temporarily edit the contents and drive it via code.  Updating you Power Point file is probably the easiest of all, a .tif file is possible but a little more complicated as may well be the .pdf file.

The key here is to open the file using a compatible interface.  Corel Draw for example avails access to VBA since Version 7.0 (I believe that's when it started) which came out back in 1998 or 1999 if memory serves so it is well past that now.  Using a program like Photo Paint (just as an example) you could drive the opening and printing process as in addition to adding code to supply any text you like to its footer.

The same process would hold true for the .PDF document though you need an application that will allow you to both edit the document and drive that process via code.  

At the end of the day it keeps coming down to which file type you're trying to use.  While it is possible to drop many image files into an access report you'll find that that is not a universal solution for all file types.  The good news is that what you're trying to do is almost certainly doable; the bad news is for each new file type a different approach may be required.
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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