Solved

Include an external linked document in an Access Report

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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

628 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