Open KMZ or KML in MS Access

learning the ropes

New member
Local time
Today, 08:27
Joined
Sep 15, 2010
Messages
2
I am trying to create a button on a form that will open Google Earth and open a specific file. This is what I have so far . . .
----------------
Private Sub GoogleEarth_Click()
On Error GoTo Err_GoogleEarth_Click
Dim stAppName As String
stAppName = "C:\Program Files\Google\Google Earth\googleearth.exe powellpoints2.kmz"
Call Shell(stAppName, 1)
Exit_GoogleEarth_Click:
Exit Sub
Err_GoogleEarth_Click:
MsgBox Err.Description
Resume Exit_GoogleEarth_Click

End Sub
----------------

It opens GE, but then I get this error message:

"Could not open file powellpoints2.kmz for reading"

I thought the problem might be KMZ instead of KML, so I unzipped the KMZ and replaced "powellpoints2.kmz" with "pp2_kml\doc.kml" but got the same message (different file name, obviously).

Once I am in GE I have no problem opening file (either way - KMZ or KML) myself. So I don't think it's a problem with the files.

I am using Windows XP and Access 2002.

Sorry if this is a simple question. I am, as the name implies, learning the ropes.

Thx.
 
does this help http://groups.google.com/group/kml-support-advanced/browse_thread/thread/4ca71ed8d2f4a22f

Also note that whilst you are just trying to open a file with Google Earth, generally all coding support for Google Earth is now being focused on the Google Earth API which is a Javascript API which you call from a website. This is just in case you want to code more things with your Google Earth Program. For example up until Ver. 5.2 there is a COM API which you could reference in your Access code.
 
Hmmmm . . . . looks like I have a lot more homework to do.

Thanks, though.
 

Users who are viewing this thread

Back
Top Bottom