Reputation: 636
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
Upvotes: 1
Views: 1054
Reputation: 30970
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 + |"|)
Upvotes: 2