Solved

Include an external linked document in an Access Report

Posted on 2007-12-04
2
611 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

743 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

16 Experts available now in Live!

Get 1:1 Help Now