![]() |
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! |
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! |
All times are GMT +1. The time now is 08:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com