Question

Locked

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.

1 total post (Page 1 of 1)  
| 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 ...

http://gnuwin32.sourceforge.net/packages/wget.htm
Using wget (above) or whatever, load the html you get from:

http://emma.msrb.org/SecurityView/SecurityDetails.aspx?cusip=581225AF6
(your example doc number was used above)

Search results for this text:
_ctl02_documentHyperLink" href="

and take all text to the next "
/MS204365-MS179673-MD348245.pdf

Merge the string with the domain:
http://emma.msrb.org

wget the result
http://emma.msrb.org/MS204365-MS179673-MD348245.pdf

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)

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Forums