Consulting

Results 1 to 2 of 2

Thread: Buttons and UDFs - Outlook 2010

  1. #1
    VBAX Newbie
    Joined
    May 2015
    Posts
    1
    Location

    Buttons and UDFs - Outlook 2010

    Hi there.

    This is my first foray into Outlook VBA and am looking for a little help to get me started.

    I am using Outlook 2010.

    I am wanting to do three things.

    1) CSO Name:

    I have a button called 'CSO Name' and I have a user defined field called 'CSO Name'.
    I want my button to populate the udf on the currently selected email with the current users email address.

    2) Started:

    I have a button called 'Start' and I have a user defined field called 'Started'.
    I want my button to populate the udf on the currently selected email with the current date and time.

    3) Finished:

    I have a button called 'Finish' and I have a user defined field called 'Finished'.
    I want my button to populate the udf on the currently selected email with the current date and time.

    Can anybody help me with code for any of the above?

    Any help is very much appreciated.

    Thanks,

    Dan.

  2. #2
    VBAX Mentor skatonni's Avatar
    Joined
    Jun 2006
    Posts
    347
    Location
    This describes the UserProperties.Add Method https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

    Inbox.Parent gets you the Mailbox name which should be the current user address.

    currItem.UserProperties.Add("CSO Name", olText).Value = strMailboxName

    currItem.UserProperties.Add("Started", olDateTime).Value = Now
    To debug, mouse-click anywhere in the code. Press F8 repeatedly to step through the code. http://www.cpearson.com/excel/DebuggingVBA.aspx

    If your problem has been solved in your thread, mark the thread "Solved" by going to the "Thread Tools" dropdown at the top of the thread. You might also consider rating the thread by going to the "Rate Thread" dropdown.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •