• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

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?
Thanks
0
InsProf
Asked:
InsProf
1 Solution
 
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

0
 
InsProfAuthor Commented:
Need to check that the field is empty (when opening for reading)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now