Web Development



VBA Code to search PDF file in a webpage.....

By raj5912 ·
I have a list of document number eg 581225AF6
and want to search a pdf file in a website http://emma.msrb.org/Error.aspx?aspxerrorpath=/Search/Search.aspx.

I want to write a code which will automatically search this file and save the pdf file extension in the excel sheet.
Any help will be realky appreciated.

Thanks in Advance.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

How hard could it be? Hire a droid to do it :-)

by cmatthews In reply to VBA Code to search PDF f ...

Using wget (above) or whatever, load the html you get from:

(your example doc number was used above)

Search results for this text:
_ctl02_documentHyperLink" href="

and take all text to the next "

Merge the string with the domain:

wget the result

After that, you'll find tons of code snippets on the web under the description of "PDF2TXT" to complete the job and arrive at some output.

BTW, if you are thinking of frequent access, you should first ask for permission from the site. (if you use wget, don't forget the 4 dependency dll's)

Related Discussions

Related Forums