1
votes

i have to open files using LotusNotes and i tried with this script:

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

and it work well.

But when i try to open file where there is a space character in the file name (ex: "C:\All Invoice\invoice.pdf") the command shell recognizes the file name as "C:\All" without all character after the space. there is someone can help me ? thank's

1
if i try: result=Shell(|H:\AdobeReader\AcroRd32.exe "| + file + |"|) lotus notes send me "illegal function call"Michele De Nardi
now it work ! Thank'sMichele De Nardi
Did you change something to get it to work or did you use my suggested code?Knut Herrmann
i use your exact code, thank's you are great !Michele De Nardi
I just made a small edit to the question in order to emphasize that it wasn't Lotus Notes that "recognizes the file name as C:\All". It is the command shell that recognized it that way.Richard Schwartz

1 Answers

2
votes

Just set the file in quotation marks like this way:

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