* googlephonebyname.prg * John Harvey If Type('OIE')='U' Public oie oie=Creat('internetexplorer.application') OIE.VISIBLE=.T. ENDIF * obviously, I have a table with the fields; firstname,lastname,city * (you can add an address, if you want to narrow the search) lcfirst=LEFT(ALLTRIM(FIRSTNAME),1) m.city=ALLTRIM(city) LClast=ALLTRIM(LASTNAME) lcaddress=', '+Alltrim(m.city)+', TN' lcurl=[http://www.google.com/search?hl=en&lr=&pb=f&biw=1003&q=]+Alltrim(Proper(LCFIRST))+[+]+Alltrim(Proper(LCLAST))+[+]+lcaddress+[&pb=f] oie.Navigate(lcurl) Do While oie.readystate<>4 Enddo Do While oie.Document.readystate<>'complete' Enddo lc=oie.Document.body.innertext m.hphone='' * I parsed the return to locate the area code I wanted, then I looped through and * checked to see if the street name matched the one I had in my table. If so, * I pulled the number. *!* If Occurs('901)',lc)>0 *!* For i = 1 To Memlines(lc) *!* lcline=Mline(lc,i) *!* If Occurs(UPPER(Alltrim(m.streetname)),UPPER(lcline))>0 *!* m.phone= Substr(lc,At('901',lc)+5,8) *!* m.hphone=m.phone+' '+Alltrim(FIRSTname)+' '+ALLTRIM(LASTNAME) *!* ?M.phone+' '+Alltrim(FIRSTname)+' '+ALLTRIM(LASTNAME)+' '+STREETname *!* Endif *!* Endfor *!* Wait Window Timeout .25 *!* IF LEN(ALLTRIM(m.phone))>0 *!* Replace phone With m.phone *!* endif *!* Endif Return m.hphone