' For example, ... MyDocs = CreateObject("WScript.Shell")_ .SpecialFolders("MyDocuments") & "\*" Wscript.echo ChooseFile(MyDocs) ' Adapted by Tom Lavedas from an example by Walter Zackery ' Requires WSH v2+ (aka 5.1+) to set StartIn location Function ChooseFile(StartIn) set IEApp = CreateObject("InternetExplorer.Application") ' Required for absolute positioning IEApp.fullscreen = True ' Hide IE window IEApp.height = 0 : IEApp.width = 0 ' Position Upper Left Corner (ULC) IEApp.Left = 200 : IEApp.Top = 200 IEApp.Navigate("about:blank") Do Until IEApp.ReadyState = 4 if Wscript.Version > 5 Then WScript.Sleep 100 Loop IEApp.document.open IEApp.document.write "" IEApp.document.close Do Until IEApp.document.Readystate = "complete" if Wscript.Version > 5 Then Wscript.Sleep 100 Loop IEApp.Visible = true set oDoc = IEApp.document if Wscript.Version > 5 Then Do Until CreateObject("Wscript.Shell").AppActivate("about") WSH.Sleep 50 Loop End if oDoc.all.file.focus if Wscript.Version > 5 Then CreateObject("Wscript.Shell").Sendkeys StartIn WSH.Sleep 100 End if oDoc.all.file.click ' opens dialog window IEApp.Visible = false ' The file dialog is modal, so no wait loop is required. ChooseFile = oDoc.all.file.value set oDoc = Nothing set IEApp = Nothing if ChooseFile = StartIn Then _ ChooseFile = "" 'that is, Cancelled End Function ' ChooseFile