Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to click on a pdf file name in a field and

Status
Not open for further replies.

DHart01

Technical User
Sep 19, 2006
7
US
have it start up a pdf file reader and display the file? I can do this with a URL (starts the browser and goes to the URL). I just created a button for that field that initiates that action. Is it possible to do this with other files such as pdf's, doc's, etc.? Using Win XP and FM7. Thanks...
 
Try using the command "Send Event". I personally think it is very poorly named but what it does is send a command to the operating system. Use Send Event and choose Open Document / Application and use a calculation like this:

"notepad.exe c:/folder/folder/readme.txt"

That should open a readme.txt file using Notepad. It is also possible to leave off the executible and have it work too using a calculation something like this:

"c:/folder/folder/readme.pdf"

I'm on Filemaker 8.5 but I think that should work on v7 as well.

-Striker
 
Striker -

This is a great suggestion. Thank you. It is exactly what I want to happen. The operating system will recognize the pdf file extension and start up the reader on the users system and display the pdf.

One other problem however. My database is a list of items with part numbers. The pdf file name is partno.pdf. I have deposited the pdf file name into a field named PDF File Name. My first instinct is to turn that field into a button and attach the Send Event command to it. But the Send Event command wants me to specify which file. I would like it to use the file name in the field. Send Event wants me to browse to select a file some where on my system.

Do you (or does anyone) know how to have Send Event use the pdf filename already in the PDF File Name field?

Thanks again for your help.
 
DHart01,

I do that exact thing myself. Here is what I do:

Send Event using this calculation:

"\\\ServerName\folder\folder\folder\\" & Part::partNo & ".pdf"

It assumes that all of the PDFs are in the same folder and that the filename is the same as the part number.

I have used a UNC path rather than a mapped drive because the user may not have a drive mapped. You will also notice that there are extra backslashes in the formula. This is because the backslash character is an escape character. You will likely need to insert them as well.

Good luck!

-Striker
 
Perfect! Works like a charm! Thanks a million!
 
I accomplished something like this by using a container field. I have a script that takes the file name, finds the file in a specified directory, and inserts a link to this.

I had to do it this way because even though there may be a record for a file in the database, it doesn't mean that it has been scanned.

In the container field, if it has a link, it shows an adobe pdf icon. If a user double-clicks on it, the scanned file shows up in acrobat reader.

_______________
[cN]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top