
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get the user name in VBS?
Hello,
I'ld like to retrieve the name of the user that uses the application in VBS.
I use the following property:
ActiveDocument.GetApplication.GetProperties.UserName
When I open the application with the desktop client, it gives me the right user name.
When I open the application on the access point, it gives me the right user name.
When I open the application with the desktop client, but with "open on server" "as a different user", it gives me the wrong user name (it returns the local user).
The QV function "OSUser" gives me the right user name.
How can I have the equivalent of "OSUser" in VBS?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nicolas,
Already you have suggested the half of the solution. Try this,
ActiveDocument.Evaluate("OSUser()")

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nicolas,
Already you have suggested the half of the solution. Try this,
ActiveDocument.Evaluate("OSUser()")

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
I was so focused on the "UserName" property I didn't thought of it...
