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!

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200801/1

Re: Application.UserName retrieves wrong username / where does it get its data? by Shauna

Shauna
Wed Jan 23 07:24:01 PST 2008

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




"Michiel via OfficeKB.com" <u40062@uwe> wrote in message
news:7ea42bceb5dc3@uwe...
> 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!
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200801/1
>



Re: Application.UserName retrieves wrong username / where does it get its data? by Jay

Jay
Wed Jan 23 08:30:54 PST 2008

Also, if you need to get the network username in VBA code, see
http://www.word.mvps.org/FAQs/MacrosVBA/GetCurUserName.htm.

--
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.

Shauna Kelly wrote:
> 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
>
>
>
>
> "Michiel via OfficeKB.com" <u40062@uwe> wrote in message
> news:7ea42bceb5dc3@uwe...
>> 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!
>>
>> --
>> Message posted via OfficeKB.com
>> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200801/1



Re: Application.UserName retrieves wrong username / where does it get its data? by Michiel

Michiel
Wed Jan 23 09:45:52 PST 2008

Shauna and Jay,

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

Michiel.

--
Message posted via http://www.officekb.com