By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

shell function over network drive

P: n/a
Am trying to open a Microsoft Word .doc file using Access 2000 with
Shell function (on Windows XP Operating system)

Here is the code :

Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
Charts\mstest.doc"

As soon as I try to open the same file on the O: drive (a directly
connected server) , I get the following error message:"The document
name or path is not valid."

This shell function works fine if the file (mstest) is on the C: drive.
(i.e C:\Temp\mstest.doc)

Also of interest, if I do not use the Shell command, and open Word on
the C: drive, I can open the mstest file on the O: drive without
difficulty.

Any ideas what the problem is with opening a .doc file on the o: drive
using the Shell function ?

Thank you for the help in advance.

Mike

Nov 20 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.
>Am trying to open a Microsoft Word .doc file using Access 2000 with
Shell function (on Windows XP Operating system)

Here is the code :

Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
Charts\mstest.doc"

As soon as I try to open the same file on the O: drive (a directly
connected server) , I get the following error message:"The document
name or path is not valid."

This shell function works fine if the file (mstest) is on the C: drive.
(i.e C:\Temp\mstest.doc)

Also of interest, if I do not use the Shell command, and open Word on
the C: drive, I can open the mstest file on the O: drive without
difficulty.

Any ideas what the problem is with opening a .doc file on the o: drive
using the Shell function ?

Thank you for the help in advance.

Mike
Nov 21 '06 #2

P: n/a

Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.
Am trying to open a Microsoft Word .doc file using Access 2000 with
Shell function (on Windows XP Operating system)

Here is the code :

Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
Charts\mstest.doc"

As soon as I try to open the same file on the O: drive (a directly
connected server) , I get the following error message:"The document
name or path is not valid."

This shell function works fine if the file (mstest) is on the C: drive.
(i.e C:\Temp\mstest.doc)

Also of interest, if I do not use the Shell command, and open Word on
the C: drive, I can open the mstest file on the O: drive without
difficulty.

Any ideas what the problem is with opening a .doc file on the o: drive
using the Shell function ?

Thank you for the help in advance.

Mike


Thanks - I'll give it a try.
Mike

Nov 21 '06 #3

P: n/a

Mike wrote:
Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.
>Am trying to open a Microsoft Word .doc file using Access 2000 with
>Shell function (on Windows XP Operating system)
>
>Here is the code :
>
>Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
>Charts\mstest.doc"
>
>As soon as I try to open the same file on the O: drive (a directly
>connected server) , I get the following error message:"The document
>name or path is not valid."
>
>This shell function works fine if the file (mstest) is on the C: drive.
>(i.e C:\Temp\mstest.doc)
>
>Also of interest, if I do not use the Shell command, and open Word on
>the C: drive, I can open the mstest file on the O: drive without
>difficulty.
>
>Any ideas what the problem is with opening a .doc file on the o: drive
>using the Shell function ?
>
>Thank you for the help in advance.
>
>Mike

Thanks - I'll give it a try.
Mike
Did not work. I actually removed the spaces in the path by renaming
folder without spaces and had same error message.

Nov 21 '06 #4

P: n/a
On 21 Nov 2006 05:18:29 -0800, "Mike" <mf***@aol.comwrote:

Did you reinstall Word in c:\ProgramFiles\MicrosoftOffice\Office? I
think not. Did you try your path in the Start>Run dialog. Again I
think not.

-Tom.

>
Mike wrote:
>Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.

Am trying to open a Microsoft Word .doc file using Access 2000 with
Shell function (on Windows XP Operating system)

Here is the code :

Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
Charts\mstest.doc"

As soon as I try to open the same file on the O: drive (a directly
connected server) , I get the following error message:"The document
name or path is not valid."

This shell function works fine if the file (mstest) is on the C: drive.
(i.e C:\Temp\mstest.doc)

Also of interest, if I do not use the Shell command, and open Word on
the C: drive, I can open the mstest file on the O: drive without
difficulty.

Any ideas what the problem is with opening a .doc file on the o: drive
using the Shell function ?

Thank you for the help in advance.

Mike

Thanks - I'll give it a try.
Mike

Did not work. I actually removed the spaces in the path by renaming
folder without spaces and had same error message.
Nov 21 '06 #5

P: n/a
Thank you again. I will try your suggestion with the run command. As
you suspected I did not reinstall Microsoft Word - but that first part
of my shell command worked fine i.e. Word loaded OK but my file on the
O:drive on the server could not be found even though I eliminated all
spaces in the path on the O: drive.

As you suggested I also tried putting double quotes but the file was
still not found on the server.

I appreciate your effort.

Mike
Tom van Stiphout wrote:
On 21 Nov 2006 05:18:29 -0800, "Mike" <mf***@aol.comwrote:

Did you reinstall Word in c:\ProgramFiles\MicrosoftOffice\Office? I
think not. Did you try your path in the Start>Run dialog. Again I
think not.

-Tom.


Mike wrote:
Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.

>Am trying to open a Microsoft Word .doc file using Access 2000 with
>Shell function (on Windows XP Operating system)
>
>Here is the code :
>
>Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
>Charts\mstest.doc"
>
>As soon as I try to open the same file on the O: drive (a directly
>connected server) , I get the following error message:"The document
>name or path is not valid."
>
>This shell function works fine if the file (mstest) is on the C: drive.
>(i.e C:\Temp\mstest.doc)
>
>Also of interest, if I do not use the Shell command, and open Word on
>the C: drive, I can open the mstest file on the O: drive without
>difficulty.
>
>Any ideas what the problem is with opening a .doc file on the o: drive
>using the Shell function ?
>
>Thank you for the help in advance.
>
>Mike

Thanks - I'll give it a try.
Mike
Did not work. I actually removed the spaces in the path by renaming
folder without spaces and had same error message.
Nov 23 '06 #6

P: n/a
Tom
You are absolutely correct about the space problem.

Shell "c:\Program Files\Microsoft Office\Office\Winword.exe c:\Chili
Backup", vbMaximizedFocus

This shell does not work.

If I rename file ChiliBackup with no spaces, this shell works fine.

But in the real world my files have spaces. I have worked trying to
make double quotes to work with files with spaces but I can't get this
to work.

How would you put the double quotes in this shell.

Thank you again.

Mike
Mike wrote:
Thank you again. I will try your suggestion with the run command. As
you suspected I did not reinstall Microsoft Word - but that first part
of my shell command worked fine i.e. Word loaded OK but my file on the
O:drive on the server could not be found even though I eliminated all
spaces in the path on the O: drive.

As you suggested I also tried putting double quotes but the file was
still not found on the server.

I appreciate your effort.

Mike
Tom van Stiphout wrote:
On 21 Nov 2006 05:18:29 -0800, "Mike" <mf***@aol.comwrote:

Did you reinstall Word in c:\ProgramFiles\MicrosoftOffice\Office? I
think not. Did you try your path in the Start>Run dialog. Again I
think not.

-Tom.

>
>Mike wrote:
>Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:
>
This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.
>
-Tom.
>
>
>
>Am trying to open a Microsoft Word .doc file using Access 2000 with
>Shell function (on Windows XP Operating system)
>
>Here is the code :
>
>Shell "C:\Program Files\Microsoft Office\Office\Winword.exe O:\Patients
>Charts\mstest.doc"
>
>As soon as I try to open the same file on the O: drive (a directly
>connected server) , I get the following error message:"The document
>name or path is not valid."
>
>This shell function works fine if the file (mstest) is on the C: drive.
>(i.e C:\Temp\mstest.doc)
>
>Also of interest, if I do not use the Shell command, and open Word on
>the C: drive, I can open the mstest file on the O: drive without
>difficulty.
>
>Any ideas what the problem is with opening a .doc file on the o: drive
>using the Shell function ?
>
>Thank you for the help in advance.
>
>Mike
>>
>>
>>
>Thanks - I'll give it a try.
>Mike
>
>Did not work. I actually removed the spaces in the path by renaming
>folder without spaces and had same error message.
Nov 23 '06 #7

P: n/a
Double them up

Shell "c:\Program Files\Microsoft Office\Office\Winword.exe ""c:\Chili
Backup""", vbMaximizedFocus

--

Terry Kreft
"Mike" <mf***@aol.comwrote in message
news:11*********************@j44g2000cwa.googlegro ups.com...
Tom
You are absolutely correct about the space problem.

Shell "c:\Program Files\Microsoft Office\Office\Winword.exe c:\Chili
Backup", vbMaximizedFocus

This shell does not work.

If I rename file ChiliBackup with no spaces, this shell works fine.

But in the real world my files have spaces. I have worked trying to
make double quotes to work with files with spaces but I can't get this
to work.

How would you put the double quotes in this shell.

Thank you again.

Mike
Mike wrote:
Thank you again. I will try your suggestion with the run command. As
you suspected I did not reinstall Microsoft Word - but that first part
of my shell command worked fine i.e. Word loaded OK but my file on the
O:drive on the server could not be found even though I eliminated all
spaces in the path on the O: drive.

As you suggested I also tried putting double quotes but the file was
still not found on the server.

I appreciate your effort.

Mike
Tom van Stiphout wrote:
On 21 Nov 2006 05:18:29 -0800, "Mike" <mf***@aol.comwrote:
>
Did you reinstall Word in c:\ProgramFiles\MicrosoftOffice\Office? I
think not. Did you try your path in the Start>Run dialog. Again I
think not.
>
-Tom.
>
>

Mike wrote:
Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:

This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.

-Tom.



>Am trying to open a Microsoft Word .doc file using Access 2000
with
>Shell function (on Windows XP Operating system)
>
>Here is the code :
>
>Shell "C:\Program Files\Microsoft Office\Office\Winword.exe
O:\Patients
>Charts\mstest.doc"
>
>As soon as I try to open the same file on the O: drive (a
directly
>connected server) , I get the following error message:"The
document
>name or path is not valid."
>
>This shell function works fine if the file (mstest) is on the C:
drive.
>(i.e C:\Temp\mstest.doc)
>
>Also of interest, if I do not use the Shell command, and open
Word on
>the C: drive, I can open the mstest file on the O: drive without
>difficulty.
>
>Any ideas what the problem is with opening a .doc file on the o:
drive
>using the Shell function ?
>
>Thank you for the help in advance.
>
>Mike
>
>
>
Thanks - I'll give it a try.
Mike

Did not work. I actually removed the spaces in the path by renaming
folder without spaces and had same error message.

Nov 24 '06 #8

P: n/a
A little late - but Thankk you. My problem is solved.

Mike
Terry Kreft wrote:
Double them up

Shell "c:\Program Files\Microsoft Office\Office\Winword.exe ""c:\Chili
Backup""", vbMaximizedFocus

--

Terry Kreft
"Mike" <mf***@aol.comwrote in message
news:11*********************@j44g2000cwa.googlegro ups.com...
Tom
You are absolutely correct about the space problem.

Shell "c:\Program Files\Microsoft Office\Office\Winword.exe c:\Chili
Backup", vbMaximizedFocus

This shell does not work.

If I rename file ChiliBackup with no spaces, this shell works fine.

But in the real world my files have spaces. I have worked trying to
make double quotes to work with files with spaces but I can't get this
to work.

How would you put the double quotes in this shell.

Thank you again.

Mike
Mike wrote:
Thank you again. I will try your suggestion with the run command. As
you suspected I did not reinstall Microsoft Word - but that first part
of my shell command worked fine i.e. Word loaded OK but my file on the
O:drive on the server could not be found even though I eliminated all
spaces in the path on the O: drive.
>
As you suggested I also tried putting double quotes but the file was
still not found on the server.
>
I appreciate your effort.
>
Mike
>
>
Tom van Stiphout wrote:
On 21 Nov 2006 05:18:29 -0800, "Mike" <mf***@aol.comwrote:

Did you reinstall Word in c:\ProgramFiles\MicrosoftOffice\Office? I
think not. Did you try your path in the Start>Run dialog. Again I
think not.

-Tom.


>
>Mike wrote:
>Tom van Stiphout wrote:
On 20 Nov 2006 11:09:55 -0800, "Mike" <mf***@aol.comwrote:
>
This is related to the path containing spaces. Put double-quotes
around it, and it will work. Same as in the Start Run dialog.
>
-Tom.
>
>
>
>Am trying to open a Microsoft Word .doc file using Access 2000
with
>Shell function (on Windows XP Operating system)
>
>Here is the code :
>
>Shell "C:\Program Files\Microsoft Office\Office\Winword.exe
O:\Patients
>Charts\mstest.doc"
>
>As soon as I try to open the same file on the O: drive (a
directly
>connected server) , I get the following error message:"The
document
>name or path is not valid."
>
>This shell function works fine if the file (mstest) is on the C:
drive.
>(i.e C:\Temp\mstest.doc)
>
>Also of interest, if I do not use the Shell command, and open
Word on
>the C: drive, I can open the mstest file on the O: drive without
>difficulty.
>
>Any ideas what the problem is with opening a .doc file on the o:
drive
>using the Shell function ?
>
>Thank you for the help in advance.
>
>Mike
>>
>>
>>
>Thanks - I'll give it a try.
>Mike
>
>Did not work. I actually removed the spaces in the path by renaming
>folder without spaces and had same error message.
Dec 4 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.