Get current user

I cannot seem to find any command within SolidWorks that will give me the current user that SolidWorks i.e. puts into the “last saved by” property.

$PRP:"SW-Last saved by(Last Saved By)"

Any ideas how to access this without saving the document?

Is this any different for PDM? How are the abbreviations of the name determined?

I feel like I am missing something incredibly obvious here…

Edit:
I forgot to mention that
GetCurrentFileUser returns an empty string, although this document is saved already!

If you want to access the user name without saving the doc, one way is to use the environment variable

Environ("username")

Here is an example:

Dim swApp               As SldWorks.SldWorks
Dim CurrentUser         As String

Sub main()

Set swApp = Application.SldWorks

'Get Username from environment variable
CurrentUser = Environ("username")

Debug.Print "Current User: " & CurrentUser


End Sub

Result:
image.png
*I am not sure about PDM since i am not using SOLIDWORKS PDM…