Assign current user as default value in Outlook custom form

I have an Outlook custom form in which I would like to add and address (mail address) field.
I would like to assign to it a default value as the current user.
This value may be changed.
I tried writing in the field's properties initial value of application.Session.currentUser but it just shows me the current date in a specific time (8:00).
Any suggestions?
Who is Participating?
David LeeCommented:
Hi, InsProf.

The code below does what you described.  Change Subject to the field you want to populate.  If that's a user-defined field, then the syntax will be something like

    Item.UserProperties.Item("YourPropertyName").Value = Application.Session.CurrentUser
Sub Item_Open()
    Item.Subject = Application.Session.CurrentUser
End Sub

Open in new window

InsProfAuthor Commented:
Need to check that the field is empty (when opening for reading)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.