Dim appGoogleEarth As EARTHLib.ApplicationGE
appGoogleEarth = New EARTHLib.ApplicationGE
Call appGoogleEarth.OpenKmlFile( _
"D:StuffBusinessTempUntitled Placemark.kml", 1)
Note: The reason for using the sleep function, is to allow Google Earth to load. If Google Earth has not finished loading and we attempt to open the KML file an error will occur.
You can download the file and code used in this article from the link below: