Results 1 to 2 of 2

Thread: Open a KML File

  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    I have a form command button which when clicked creates a Google Earth KML file on the fly from user selected options. I would like to then open the created file for display outside of Access. I've tried the following

    varRetVal = Shell( _
    "C:\Documents and Settings\All Users\Desktop\association.KML", _
    vbNormalFocus _
    )

    but get an error 53: File Not found. I then tried

    varRetVal = Shell( _
    "RUNDLL32.EXE URL.DLL,FileProtocolHandler " & _
    "C:\Documents and Settings\All Users\Desktop\association.kml", _
    vbNormalFocus _
    )

    but nothing seems to happen ... no errors and Google Earth is not started. I do get a non-zero value for varRetVal. The KML is a valid file. If I open it, Google Earth is started and the KML is displayed in Temporary Places.

    Thanks in advance for your assistance,
    Marty

  2. #2
    Gold Lounger Roderunner's Avatar
    Join Date
    Dec 2009
    Location
    Scotland.
    Posts
    3,462
    Thanks
    16
    Thanked 216 Times in 183 Posts
    O wad some Power the giftie gie us, to see oursels as ithers see us!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •