Sorry for the confusion and thanks for your help so far.
In answer to these questions:
A few thoughts jump to mind when reading your posts:
What are you doing with these PDF's -? Why do you open them ? What information is in the pdf that you want to enter into the database ? Why not automate the entire task ? What is the reference too ? Is it a file reference ? A Page Reference ? Why are you adding a reference that links to an ASP page/form ? Do you change these regularly, or create new ones that need to be re-linked ? How do you determine the next file in order ? etc....
All I can glean from your posts is:
1. You have a database with an ASP page
2. You enter links to other asp pages/forms from that page (who knows why..)
3. You then goto said page and enter information from a PDF - what information and why ?
4. This then gets posted to the (same?) database
5. You then rinse and wash,...
And what you're asking is how can it open up the pdf ready for you to enter your information..? right ?
How would we know which pdf to open ? where is the pdf located ? locally or at the server ?
If this is a data entry task, why not automate the upload of the content from the PDF into the database ? - i.e. convert PDF to XML, then parse the XML and post to the database - then you can just send all your files to the server, and press go..
It is essentially a catalogue. I have over 4000 pdfs which are medical literature I have collected relevant to my research and job.
The database is a catalogue of these - it contains the reference details (journal, year, volume etc.) and categorisation of the reference along with keywords and a comment. This allows easy retrieval and grouping of references. This could not be automated.
The database is managed by 6 ASP pages, it all runs off a local server and the PDFs are on the same hard drive (separate partition though). When a PDF is downloaded and stored I assign it a number hence they are all in numerical sequence. When I have downloaded a few I then enter them all into the database.
One page is a simple form to populate with the information and my comments on the PDF. Adobe is open with the relevant PDF at this point. Once this form is posted I then open up the next PDF and repeat until all are entered. The PDFs remain where they are.
The slowest step is entering the info - can't do much about that - and the next slowest is opening up the next PDF in adobe. At present I just type in the next number to call it up.
Thus my query over automation is:
Can I ask Adobe to open with a certain PDF from within an ASP page?
This would help in two situations:
The front ASP page contains links to the other pages (add, edit, search, list etc.). When I click add it would be nice if adobe opened the next PDF in a separate window to the ASP page with the form. The number of the PDF is easy to retrieve and in fact is already available as the front page contains a count of the current total number polled from the database on first opening.
When the form has been posted I would then like adobe to open the next PDF - again easily derived, and close the previous file.
So, can I call an instance of Adobe Reader from within ASP and specify the file to open?
A lesser solution may be to pass the name of then next PDF to the clipboard so it can be pasted into the Adobe file open dialgoue manually to save typing the name in manually.
If the PDF files are located on the same machine as the web page (it sounds like both on your local machine in this case) then yes, you could.
The first thing you would use is the FileSystemObject. This object has methods for getting the contents of a folder as a collection of files. Provided you only have "to review" items in a folder, you could use the FileSystemObject to create a list of the files in the folder and, when your review process is done, move the reviewed PDF to another folder.
The next thing is simply a trick. When you open a link to a PDF in a browser, it automatically tries to open adobe reader to read the document. The only problem is that you don't want it to open the link in your current browser, or you won't be able to enter data in your form. If your only going to use this on your local machine you can use a reference to the full path of the file on your harddrive (C:\yourFolder\yourfile.pdf), if your ever going to use this remotely then you would want to place your "to be reviewed" pdf's in a folder in the web folder.
To solve the need for two windows and the need to easily get to your entry form, you could have a simple index page tat lists all the PDF files in the given folder as links. As long as you place the attribute target="_blank" in your anchor tags, the link will be opened in a new window. You could additionally use a small piece of javascript to direct the current page to the form page, or you could have that as a secondary link on the page.
Tarwn - That is a neat workaround but as my PDFs are already named in numerical sequence it would not really be neccessary to populate a file list.
I hope that lengthy explanation explains my question...