How to read an attached file in document?

i am writing a notes script which read an attached file in document. but i could not find any way which read the file directly. have i to extract the file into any server directory and read from the external file?

Subject: how to read an attached file in document?

You will have to detatch the file to a directory, then using the extracted file, create an object. This will not work on Unix & OS2, but fine on Windows server. I assume that you need to get into the file and read values.