Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nicolas_martin
Partner - Creator II
Partner - Creator II

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?

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Nicolas,

Already you have suggested the half of the solution. Try this,

ActiveDocument.Evaluate("OSUser()")

View solution in original post

2 Replies
tamilarasu
Champion
Champion

Hi Nicolas,

Already you have suggested the half of the solution. Try this,

ActiveDocument.Evaluate("OSUser()")

nicolas_martin
Partner - Creator II
Partner - Creator II
Author

Thank you!

I was so focused on the "UserName" property I didn't thought of it...