Andrew,
It has been a while since I wrote this code, but I included
the whole thing so you could see how it works. These days you may
get a security warning based on your computer settings since
scripts can be harmful. In this script, the text is directed to a
message box. That is not what you want. I think I can combine this
with a hidden link script and provide what you are looking for. I
should be able to get to it sometime today. Just to be clear - you
are producing a .chm output and the file is an external file,
correct? What type of file is it - .doc, .txt, .htm, pdf? You can
email me or post here.
John