Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    User Name (VBA/Word/2003)

    As I understand the situation, by default Word assigns the Windows username to Word. The user then has the ability to change the Word username.

    I am able to determine the Word username with
    "Var = Application.UserName".

    However I have been unable to find code to determine the Windows username.

    Any help will be appreciated.

    T.I.A.
    Regards
    Don

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: User Name (VBA/Word/2003)

    <code>var = Environ("username")</code>
    will get you the login ID.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: User Name (VBA/Word/2003)

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Thank You Rory
    Regards
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •