P
Piri
Access 97
I am creating an xls file using:
DoCmd.TransferSpreadsheet acExport, 8, "PartsUsed4Period", FilePath &
FileName
where the FilePath has been a string without spaces, and Filename is the
name given to the spreadsheet, that name depending on certain criteria.
I sometimes add further tables (worksheets) to that xls file.
I have been successfully using the following to open the spreadsheet
after creating it:
Call Shell("C:\Program Files\Microsoft Office\Office\EXCEL.EXE " &
FilePath & FileName, 1)
where the Excel app version is from the Office 97 suite.
That has worked fine.
I am now trying to open this spreadsheet using
Call Shell("C:\Program Files\Microsoft Office 2000\Office\EXCEL.EXE " &
FilePath & FileName, 1)
where the Excel app is from the Office 2000 suite.
It seems not to like the fact that the new FilePath includes a space in
the directory name, and sees, for example "C:\John
Smith\Reports\ThisReport.xls" as two files to open, namely
"C:\John.xls" and then "Smith\Reports\ThisReport.xls"
I cannot change the directory name.
Is there a way I can have the latter call accept spaces in a directory name?
Thanks for any assistance.
Piri
I am creating an xls file using:
DoCmd.TransferSpreadsheet acExport, 8, "PartsUsed4Period", FilePath &
FileName
where the FilePath has been a string without spaces, and Filename is the
name given to the spreadsheet, that name depending on certain criteria.
I sometimes add further tables (worksheets) to that xls file.
I have been successfully using the following to open the spreadsheet
after creating it:
Call Shell("C:\Program Files\Microsoft Office\Office\EXCEL.EXE " &
FilePath & FileName, 1)
where the Excel app version is from the Office 97 suite.
That has worked fine.
I am now trying to open this spreadsheet using
Call Shell("C:\Program Files\Microsoft Office 2000\Office\EXCEL.EXE " &
FilePath & FileName, 1)
where the Excel app is from the Office 2000 suite.
It seems not to like the fact that the new FilePath includes a space in
the directory name, and sees, for example "C:\John
Smith\Reports\ThisReport.xls" as two files to open, namely
"C:\John.xls" and then "Smith\Reports\ThisReport.xls"
I cannot change the directory name.
Is there a way I can have the latter call accept spaces in a directory name?
Thanks for any assistance.
Piri