VB调用word打开文件,路径内“/”和“ ”被转义。
Imports Microsoft.Office.Interop.Word
Private w_app As Application
Private w_doc As Document
w_doc = w_app.Documents.Open(StrConv(filePath, VbStrConv.SimplifiedChinese))
其中filePath为“C:/Temp/测试文档Test File.docx”,执行到open时word弹出窗口“抱歉找不到您的文件。是否可能被移动、重命名或删除?(C:\//Temp/测试文档Test20%File.docx)”。