Field Name of Address Field on Maps.Live.Com web site

T

Ted

Good Morning!
I found some code that opens IE, navigates to a web page and enters data
into fields then clicks to enter the data.
The problem is you need the field name for the code to work.
Does anyone know the name of the field you enter the address into so that I
can program that into my VBA (I'm using Access)?
Here is the code I've modified from code Leith Ross submitted in another
posting.
I could easily do this in mapquest, but maps.live is my site of choice for
obvious reasons :)

'Copy address to maps.live.com to view address on map
Dim IEapp As Object
Dim strPassword As String
Dim strUserName As String
Dim strURL As String
Dim strAddress As String

strURL = "http://maps.live.com/"
strAddress = Me.Address1 & ", " & Me.Zip

Set IEapp = CreateObject("InternetExplorer.Application")
With IEapp
.Visible = True
.Navigate strURL
End With
'Wait until Internet Explorer finishes loading
While IEapp.Busy
DoEvents
Wend
'Inserts the Address

IEapp.Document.all("Location-I need this field name").Value = strAddress
'Wait till the page is loaded
While IEapp.Busy
DoEvents
Wend
'Click or enter
IEapp.Document.all.Click
While IEapp.Busy
DoEvents
Wend
 
K

Klatuu

Navigate to the page where you are looking for the field name.
From you IE menu, select View, Source
Look for a line that looks something like this:

<INPUT TYPE=text name=q size=31 maxlength=255 value="">

This is only an example copied from a randomly chosen page, but it should
give you an idea.
 
T

Ted

Thanks for the information.
I looked and looked and looked and I couldn't figure out the name of the
input box so I'll just have to go with using MapQuest.
 

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