A
Alan B. Densky
Hello,
I'm trying to create a document management system using Access. It works
great with MS Word, but when I try to open an Excel file or any other file,
if there is a space in the name of the document or in the path to the
document, it bombs out. Here is a sample of my code:
If right(Me!PathToDocument, 3) = "xls" Then
stAppName = "EXCEL.EXE" & " " & Me!PathToDocument
End If
Call Shell(stAppName, 1)
I've tried the following without any success:
stAppName = "EXCEL.EXE" & " " & "'" & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE & ' " & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE " & "'" & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE " & """ & Me!PathToDocument & """""
Thanks in advance to anyone who has the answer to this one.
Alan B. Densky
I'm trying to create a document management system using Access. It works
great with MS Word, but when I try to open an Excel file or any other file,
if there is a space in the name of the document or in the path to the
document, it bombs out. Here is a sample of my code:
If right(Me!PathToDocument, 3) = "xls" Then
stAppName = "EXCEL.EXE" & " " & Me!PathToDocument
End If
Call Shell(stAppName, 1)
I've tried the following without any success:
stAppName = "EXCEL.EXE" & " " & "'" & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE & ' " & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE " & "'" & Me!PathToDocument & "'"
stAppName = "EXCEL.EXE " & """ & Me!PathToDocument & """""
Thanks in advance to anyone who has the answer to this one.
Alan B. Densky