vferrara
2006-02-09, 11:00 PM
Hello to All AUGI Members:
I had a lisp routine that used the shell command to run Excel opening a specified file. The IT department changed tha install path for the Excel.exe file to a location that has spaces in the path such as C:\Program Files\Microsoft Office\Office11\Excel.exe.
Beacuse of the spaces my program will not run Excel with the specified file. Below is a sample of the lisp code that I am using:
#######SAMPLE CODE
(defun c: Dexcel (/ )
(SETVAR "CMDECHO" 0)
;;;This is the old path that worked OK
(command "shell" "P:\\SHARED\\OFFICE\\PFILES\\MSOFFICE\\OFFICE\\EXCEL.exe H:\\cad4\\support\\Test-Excel.xls")
;;;This is the new path that does not work
(command "shell" "C:\\Program Files\\Microsoft Excel\\Office11\\Excel.exe H:\\Cad4\\support\\Test-Excel.xls"
(SETVAR "CMDECHO" 1)
(princ)
)
Is there a way to protect the path that contains the spaces.....??
Any assistance would be appreciated.
Regards,
Vince
I had a lisp routine that used the shell command to run Excel opening a specified file. The IT department changed tha install path for the Excel.exe file to a location that has spaces in the path such as C:\Program Files\Microsoft Office\Office11\Excel.exe.
Beacuse of the spaces my program will not run Excel with the specified file. Below is a sample of the lisp code that I am using:
#######SAMPLE CODE
(defun c: Dexcel (/ )
(SETVAR "CMDECHO" 0)
;;;This is the old path that worked OK
(command "shell" "P:\\SHARED\\OFFICE\\PFILES\\MSOFFICE\\OFFICE\\EXCEL.exe H:\\cad4\\support\\Test-Excel.xls")
;;;This is the new path that does not work
(command "shell" "C:\\Program Files\\Microsoft Excel\\Office11\\Excel.exe H:\\Cad4\\support\\Test-Excel.xls"
(SETVAR "CMDECHO" 1)
(princ)
)
Is there a way to protect the path that contains the spaces.....??
Any assistance would be appreciated.
Regards,
Vince