Using VBA to send a javascript:opendocument command, then grab information from the active IE6 windo

K

Ker_01

I need to automate the cataloging of some files that are only available to
me via a web interface. They are opened from within existing web pages using
<A Href=javascript:OpenDocument('12345678');> where 12345678 is a unique
document ID.

I have the URLs of the web pages that host these documents (I'm building
them in an array in VBA) but I need help with two things:

(1) If I have the host page URL and the unique documentID, how can I pass
those back to the server (presumably through IE6?) to load the document in a
browser window? I believe that the documents are all .doc or .pdf

(2) Once that document is open and therefore exposes it's true path in the
URL window in IE6, is there any way I can capture that URL from IE and bring
it back into Excel to store in my records?

Thanks!
Keith
 
T

Tim Williams

Best bet would be to look at the js function "OpenDocument()" in the source
of your listing page and figure out what it does. Then use that logic to
convert the js href into a URL.

Tim
 
K

Ker_01

Thanks Tim!! The HTML source page is so large I had just been focusing on
the finding the "A Href" links, and hadn't noticed (and being new to HTML,
didn't know) that the OpenDocument referred to a sub at the beginning of the
page. Woot!

Thanks again,
Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top