Skip to content

Instantly share code, notes, and snippets.

@eggist77
Last active December 24, 2022 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggist77/49c5ce0182bc92b21e828e8b70e06f0c to your computer and use it in GitHub Desktop.
Save eggist77/49c5ce0182bc92b21e828e8b70e06f0c to your computer and use it in GitHub Desktop.
hatena: 1593831099
Function getFilePathDlgIE()
Dim ie
Set ie = WScript.CreateObject("InternetExplorer.Application")
ie.Navigate "about:blank"
Do While ie.Busy = True And ie.ReadyState <> 4 'READYSTATE_COMPLETE = 4
WScript.Sleep 100
Loop
ie.document.write "<html><body><input type='file' id='selectFileDialog'></body></html>"
ie.document.getElementById("selectFileDialog").click
getFilePathDlgIE = ie.document.getElementById("selectFileDialog").Value
ie.Quit
Set objIE = Nothing
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment