Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default saving file based on network login

I have an Excel spreadsheet which will be used by many users across our network. I would like to have the spreadsheet save to a user's My Documents folder in Windows 2000 (C:\Documents and Settings\"UserName"\My Documents). The "UserName" is the person's network ID, the folder being set up when they initially log on to the Network. Is there any way inside an Excel macro that I can get this Network ID/User name? I tried Application.UserName but that seems to return the generic computer owner, and not the name of the person logged on to the Network. Once I have the Network ID I can put that variable in the file save path so all users can use the same spreadsheet to do their saves

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default saving file based on network login

Hi johnsond,

You can use API calls to get the path of the current user's My Documents
folder:

http://groups.google.com/groups?hl=e...ftngp02&rnum=1

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


johnsond wrote:
I have an Excel spreadsheet which will be used by many users across
our network. I would like to have the spreadsheet save to a user's My
Documents folder in Windows 2000 (C:\Documents and
Settings\"UserName"\My Documents). The "UserName" is the person's
network ID, the folder being set up when they initially log on to the
Network. Is there any way inside an Excel macro that I can get this
Network ID/User name? I tried Application.UserName but that seems to
return the generic computer owner, and not the name of the person
logged on to the Network. Once I have the Network ID I can put that
variable in the file save path so all users can use the same
spreadsheet to do their saves.

Thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Excel File to a Network Drive Jason Excel Discussion (Misc queries) 2 March 2nd 10 05:16 PM
Excel Saving to Temp File for files on network samdev Excel Discussion (Misc queries) 2 September 2nd 06 01:43 PM
problem saving excel file on a network cell Excel Discussion (Misc queries) 1 March 20th 06 07:46 PM
Sharing Excel File on Network - Saving Ken Goodwin[_2_] Excel Programming 1 December 9th 03 07:46 PM
Login ID over a network Patrick[_5_] Excel Programming 2 November 14th 03 11:55 AM


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"