views:

373

answers:

1

Dear all,

I would like to get a pair of coordinates (longitude, latitude) from a postal address.

I am coding VBA in an Excel workbook. I can assume that Google Earth is installed and registered as COM server. Thus I have been looking for a way to use the Google Earth COM API to achieve this, however I have not managed to find anything.

Most of the hits I found on the web are for web programmers and are about using the "Google geocoding API" which is JavaScript, which I think is not feasible for my case.

+2  A: 

Why do you want to use Google Earth? It can't geocode if the computer is not online, and if it is online, you may as well use the web apis directly. There are lots of examples of using VBA to access geocoding apis on the web, both with Google, and with other providers (Bing, Yahoo, etc.).

Note that if this is for a private application, rather than one that anyone can download, it may be against the Google terms of service, and you may need to use a different provider. See this question in Google's FAQ.

rjmunro
Hi rjmunro. Although this does not directly answer my question, I just realized there will probably never be a better answer than yours, thus the late acceptance.
chiccodoro