M
Margaret Bartley
This works:
strCommand = "winword.exe C:\test.doc /mDoThis"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
When I execute this, I get a file not found error:
strCommand = "winword.exe C:\Documents and Settings\mbartley\test.doc"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
Same thing for this:
strCommand = "winword.exe 'C:\Documents and
Settings\mbartley\test.doc'"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
My assumption is it's the spaces in the directory that are flummoxing the
compiler.
I'm modifying someone else's complicated code. This is a utility procedure,
and I don't want to change the overall logic by implementing a different
approach, I want to keep the Shell command logic, but don't know how to
implement it when I've got a space in the file name.
Any help?
strCommand = "winword.exe C:\test.doc /mDoThis"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
When I execute this, I get a file not found error:
strCommand = "winword.exe C:\Documents and Settings\mbartley\test.doc"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
Same thing for this:
strCommand = "winword.exe 'C:\Documents and
Settings\mbartley\test.doc'"
varMyDoc = Shell(strCommand, vbMaximizedFocus)
My assumption is it's the spaces in the directory that are flummoxing the
compiler.
I'm modifying someone else's complicated code. This is a utility procedure,
and I don't want to change the overall logic by implementing a different
approach, I want to keep the Shell command logic, but don't know how to
implement it when I've got a space in the file name.
Any help?