Assign current user as default value in Outlook custom form

Posted on 2009-12-29
Last Modified: 2012-05-08
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?
Question by:InsProf
    LVL 76

    Accepted Solution

    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


    Author Closing Comment

    Need to check that the field is empty (when opening for reading)

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Use email signature images to promote corporate certifications and industry awards.
    Sometimes Outlook might have problems sending a message. There may be various causes- corrupted PST, AV scanner etc. The message, instead of going to the Sent Items folder, sits in the Outbox indefinitely. To remove it you can use a free tool cal…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now