Lotus Notes - 打开带空格字符的文件

时间:2014-01-13 13:20:06

标签: lotus-notes lotusscript

我必须使用LotusNotes打开文件,我尝试使用此脚本:

dim file as string
file="C:\invoice.pdf"
result=Shell("H:\AdobeReader\AcroRd32.exe "+ file)

它运作良好。

但是当我尝试打开文件名中有空格字符的文件时 (例如:“C:\ All Invoice \ invoice.pdf”) 命令shell将文件名识别为“C:\ All”,空格后没有所有字符。 有人可以帮助我吗? 感谢的

1 个答案:

答案 0 :(得分:2)

只需将文件设置为引号,如下所示:

Dim file As String
Dim result As variant
file="C:\All Invoice\invoice.pdf"
result=Shell(|H:\AdobeReader\AcroRd32.exe "| + file + |"|)