Hi Stara.
I was able to resolve this issue, and haven't worked on it for years (doesn't seem that long ago).
I'm not entirely sure what you are trying to do, but I'll give it my best shot:
My code is as follows:
Sub XDocument_OnLoad(eventObj)
Dim objNet On Error Resume Next 'In case we fail to create object then display our custom error
Set objNet = CreateObject("WScript.NetWork") Dim strInfo Dim userName2 XDocument.DisplayAlerts = False
strInfo = objNet.UserName XDocument.DOM.selectSingleNode("dfs:myFields/my:LANUserID").Text = strInfo
End Sub
I derived the user name (in my company it is a code like ABCDE), and then used the variable in an SQL --> Access query to resolve the ID into a actual name. I have also done this by automating to Outlook (in other (VBA) projects). I'm sure you could tie the Function to run off the submit button on your form.
WHEELS