Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

windows7 VBScript open file dialog box - fakepath

$
0
0

is there any solution in vbs to handle c:\fakepath?

Windows7 x86

 

code:

 

Option Explicit
 
 Function ChooseFile()
     Dim Result
     Dim IE : Set IE = CreateObject("InternetExplorer.Application")
     With IE
         .Visible = False
         .Navigate("about:blank")
         Do Until .ReadyState = 4 : Loop
         With .Document
             .Write "<html><body><input id='f' type='file'></body></html>"
             With .All.f
                 .Focus
                 .Click
                 Result = .Value
             End With
         End With
         .Quit
     End With
     Set IE = Nothing
    ChooseFile = Result
 End Function
 
 MsgBox ChooseFile()


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>