Hi Anna,
You can use Environment.Username to get username. Getting Domain, however,
will require special Environment permissions (if you are using .NET). I
would suggest using an Active Directory Web service to get the data. Here's
an example of one (ours) that will do what you need:
http://www.infopathdev.com/webstore/detail.aspx?itemid=18
Regards,
Patrick
> I am looking for a function or vbscript code sample to get and store
> domain\username in an Infopath form field. The form is created from a
[quoted text clipped - 4 lines]
>
> Anna