Solved

Include an external linked document in an Access Report

Posted on 2007-12-04
2
659 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
2 Comments
 
LVL 16

Accepted Solution

by:
Rick_Rickards earned 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

685 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