R
Rob Oldfield
Can I just add that I think that "My family and other animals" is an abysmal
book? Could we try searching for something a little better?
book? Could we try searching for something a little better?
Douglas J. Steele said:Hey, it worked really well!
Create a form and add a Web Browser to it (you can use the Insert | ActiveX
Control... from the menu, and scroll through until you find the Microsoft
Web Browser entry) I chose to rename the control ocxBrowser.
Add code to navigate to the URL. I chose to add a button, cmdGotoURL, with
the following code:
Private Sub cmdGotoURL_Click()
On Error GoTo Err_cmdGotoURL_Click
Dim strURL As String
strURL =
"http://www.loc.gov/cgi-bin/zgate?ACTION=INIT&FORM_HOST_PORT=/prod/www/data/
z3950/locils1.html,z3950.loc.gov,7090&CI=121347"
Me.ocxBrowser.Navigate strURL
End_cmdGotoURL_Click:
Exit Sub
Err_cmdGotoURL_Click:
MsgBox Err.Number & ": " & Err.Description & vbCrLf & vbCrLf & _
"Occurred in cmdGotoURL_Click"
Resume End_cmdGotoURL_Click
End Sub
Add another button cmdGetHTML with the following code:
Private Sub cmdGetHTML_Click()
On Error GoTo Err_cmdGetHTML_Click
Debug.Print Me.ocxBrowser.Document.documentElement.innerText
End_cmdGetHTML_Click:
Exit Sub
Err_cmdGetHTML_Click:
MsgBox Err.Number & ": " & Err.Description & vbCrLf & vbCrLf & _
"Occurred in cmdGetHTML_Click"
Resume End_cmdGetHTML_Click
End Sub
Fire up the form, and click on the cmdGotoURL button. That'll bring up the
Library of Congress search form in the browser you put on the form. Enter
"My family and other animals" in the Search Terms box, then click on the
Submit Query button. The results will appear on the browser. Click on the
cmdGetHTML button, then look in the Debug window. You should see:
VOYAGER[my family and other animals[1,4,2,3,3,1,4,1,5,1,6,1]]Query Results
Records 1 through 3 of 3 returned.
Author: Durrell, Gerald Malcolm, 1925-
Title: My family and other animals.
Published: New York, Viking Press, 1957 [c1956]
LC Call No.: QH151.D8 1956a
Author: Durrell, Gerald Malcolm, 1925-
Title: My family and other animals.
Published: London, Hart-Davis, 1956
LC Call No.: QH151.D8 1956
Author: Durrell, Gerald Malcolm, 1925-
Title: My family and other animals / Gerald Durrell.
Published: New York : Penguin Books, 2000.
LC Call No.: QH151.D8 2000
Go back to the Search Form
This display was generated by the CNIDR Web-Z39.50 gateway, version 1.08,
with Library of Congress Modifications.
Hopefully you can parse that however you want.
Since this page uses the POST method to navigate to the next form, you could
probably use the concepts presented in
http://support.microsoft.com/?id=167658 to be able to do everything
programmatically (as opposed to having to key the information into the
browser and click on the Submit button). Sorry, too lazy to look into that
right now.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Fred Boer said:What!? I thought you'd be done by now!
Seriously, please don't spend any more time or effort on this than you
want, Doug! I'm in no hurry, and, well, it isn't mission critical. And as
far as my wife and kids are concerned it ain't even mission necessary!!
Fred