473,499 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

defaulting to my documents folder

Hi,

I have an application which has several hard coded references to
"C:\My Documents". Shortly our network setup will be changed so that a
users My Documents folder will be on a mapped network home drive, and
nothing will be written to the local C:.

So my question is, how do I explicitly code the path to the users My
Documents folder so that it will use it no matter where it's sitting
(whether it be on C: or a network drive)?

ie instead of "C:\My Documents\" something like "My Documents\"

Thanks in advance,

Mong
Nov 12 '05 #1
3 4937
TC
Google on:

CSIDL_PERSONAL VBA

This will lead you to code that gets the pathname of the current user's My
Documents folder (where-ever that folder may be).

HTH,
TC
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Hi,

I have an application which has several hard coded references to
"C:\My Documents". Shortly our network setup will be changed so that a
users My Documents folder will be on a mapped network home drive, and
nothing will be written to the local C:.

So my question is, how do I explicitly code the path to the users My
Documents folder so that it will use it no matter where it's sitting
(whether it be on C: or a network drive)?

ie instead of "C:\My Documents\" something like "My Documents\"

Thanks in advance,

Mong

Nov 12 '05 #2
Thanks for that, but I'm just wondering is API the only way?

Was hoping I wouldn't have to add too much code as I won't be the one
looking after the app, most probably the user will so I don't want to
over complicate it.

"TC" <a@b.c.d> wrote in message news:<1067399787.554381@teuthos>...
Google on:

CSIDL_PERSONAL VBA

This will lead you to code that gets the pathname of the current user's My
Documents folder (where-ever that folder may be).

HTH,
TC
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Hi,

I have an application which has several hard coded references to
"C:\My Documents". Shortly our network setup will be changed so that a
users My Documents folder will be on a mapped network home drive, and
nothing will be written to the local C:.

So my question is, how do I explicitly code the path to the users My
Documents folder so that it will use it no matter where it's sitting
(whether it be on C: or a network drive)?

ie instead of "C:\My Documents\" something like "My Documents\"

Thanks in advance,

Mong

Nov 12 '05 #3
TC
Maybe there is something available from Windows Scripting Host? (if the
users will have WSH on their PCs)

HTH,
TC
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Thanks for that, but I'm just wondering is API the only way?

Was hoping I wouldn't have to add too much code as I won't be the one
looking after the app, most probably the user will so I don't want to
over complicate it.

"TC" <a@b.c.d> wrote in message news:<1067399787.554381@teuthos>...
Google on:

CSIDL_PERSONAL VBA

This will lead you to code that gets the pathname of the current user's My Documents folder (where-ever that folder may be).

HTH,
TC
"Mong" <mo*********@yahoo.com.au> wrote in message
news:47**************************@posting.google.c om...
Hi,

I have an application which has several hard coded references to
"C:\My Documents". Shortly our network setup will be changed so that a
users My Documents folder will be on a mapped network home drive, and
nothing will be written to the local C:.

So my question is, how do I explicitly code the path to the users My
Documents folder so that it will use it no matter where it's sitting
(whether it be on C: or a network drive)?

ie instead of "C:\My Documents\" something like "My Documents\"

Thanks in advance,

Mong

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1019
by: Srilatha | last post by:
Hi, I have a folder called "Public_Documents" on my web server. The documents in this folder should be accessible to everyone. I want to create a sub folder here "Private Documents". Only the...
1
1381
by: bradley | last post by:
I have an \upload folder beneath the web root where I have MS Word and other documents that I would prefer not be available to the public. How can I configure web.config to prevent these files from...
6
28671
by: John | last post by:
Hi I would like to get the path to the My Docuemnts Folder so I can list all the files / folders in a TreeView. Thanks John
3
5623
by: Li Pang | last post by:
Hi, I want to create a file in My Documents folder. How to get the folder path? Thanks in advance
2
2379
by: Dixie | last post by:
In a network situation, if you write files to the My Documents folder, would it go to a different folder for each person's logon? If so, how do I send a text file to My Documents with...
0
1499
by: Paul.Hawkes | last post by:
All I'm having trouble getting the following to work. I have been able to download and delete a file with the same credentials and similar code, but when I try upload the file. I get a returned...
2
3512
by: queanbeyan | last post by:
Hi I have found that many of my potential users of my application are not able to write to their program files directory on C:\program files, however they have access to 'My documents'. i...
4
8724
by: Dennis C. Drumm | last post by:
How do I programmatically get the path for the windows shared documents folder which is also the all user's document folder. Thanks, Dennis
3
4325
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.