Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Application.UserName retrieves wrong username / where does it get its data?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michiel - 23 Jan 2008 14:01 GMT
Hi,

Does anyone know where Application.UserName retrieves its data?

When I entered the firm my Windows UserID was ABC
Later they changed it to XYZ

Everywhere in Windows I can see my user-ID is XYZ (eg in documents and
settings and of course when logging on/off)

However, when I run "?Application.UserName" in the immediate window, VBA
retrieves my old user-ID ABC instead of XYZ.

Also, when I create a new file and lok at properties. The user-ID ABC is
shown.

Where should I look to fix this?

Thanks!
Shauna Kelly - 23 Jan 2008 15:24 GMT
Hi Michiel

Application.UserName reports whatever you type at Tools > Options > User
Information.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Hi,
>
[quoted text clipped - 17 lines]
>
> Thanks!
Jay Freedman - 23 Jan 2008 16:30 GMT
Also, if you need to get the network username in VBA code, see
http://www.word.mvps.org/FAQs/MacrosVBA/GetCurUserName.htm.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Hi Michiel
>
[quoted text clipped - 31 lines]
>> Message posted via OfficeKB.com
>> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200801/1
Michiel - 23 Jan 2008 17:45 GMT
Shauna and Jay,

It worked (both ways)!
Thank you so much both for help!!

Michiel.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.