473,383 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

shell function over network drive

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
8 6959
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

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

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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork =...
3
by: Tiziano Bettio | last post by:
Hi there I'm looking for a simple solution of a win32 shell extension (virtual drive). It should make available a new drive with letter, which will be read-only. Instead of a network drive or...
3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
1
by: Tedmond | last post by:
Dear all, I need to map a network drive at run-time then disconnect it after use. The only way I know and I am using is creating a Process to call the shell command 'net use'. It has no...
7
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) ...
5
by: Niloday | last post by:
Hi All, I am trying to access a mapped network drive from a service that I have created. The service needs to create/delete folders/files on a network drive. When I tried to connect to a...
1
by: mbah Sumani via .NET 247 | last post by:
(Type your message here) I Think it's the stupidness of Windows. Why the service can't access network drive but console apps or windows application can do it? So my suggestion is make the program...
2
by: Li Pang | last post by:
Hi, I'd like to know how to easily map a network drive using vb.net. thanks
2
by: =?Utf-8?B?Z3JlYXRiYXJyaWVyODY=?= | last post by:
Hi, Is there an API call for mapping a network drive? i think i am using the right expression but i am referring to something in the same realm as InitiateSystemShutdown. That's an API call...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.