Solved

Include an external linked document in an Access Report

Posted on 2007-12-04
2
626 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

932 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

13 Experts available now in Live!

Get 1:1 Help Now