lacy-li

vb获取本地文件路径后不能直接使用要将"\"替换为"\\"

Dim wShell ,oExec ,File_Selected
Set wShell = CreateObject("WScript.Shell")
Set oExec = wShell.Exec("mshta.exe ""about:<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
‘文件路径
File_Selected = oExec.StdOut.ReadLine

dim rpath

'要将“\”替换为"\\"

rpath=Replace(File_Selected,"\","\\")

相关文章:

  • 2021-10-20
  • 2021-04-10
  • 2021-12-09
  • 2021-12-08
  • 2021-11-27
  • 2021-05-17
  • 2021-11-23
猜你喜欢
  • 2021-11-27
  • 2021-11-07
  • 2021-12-09
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-11-19
相关资源
相似解决方案