Outlook 2000 customization

I would like to customize Outlook as follows.

1) When I open an e-mail the time that the e-mail was sent is logged into an Outlook field

2) When I reply the time of the reply is pumped into another field as well as the 'subject' line

3) After back and forth with the corrrespondent I want to be able to send a 'sign off' e-mail at which point the sending time of this 'last' e-mail is dumped into yet another field in Outlook. At the same time a fourth field is filled in with the difference in time between the first field and the last field.

So for instance if I get an e-mail request at 1:00 AM Friday the 13, 2013 and I reply to it at 1:05 AM Friday 13, 2013 and then there is further back and forth and finally I send an e-mail 'done' at 1:13 AM Friday 13, 2013 at the end of an e-mail exchange I will have the following fields available to me:

subject line of e-mail
receipt of request -  1:00 AM Friday the 13, 2013 (in some appropriate date format
reply to request -     1:05 AM Friday 13, 2013
confirm completion - 1:13 AM Friday 13, 2013
elapsed time           - 8 minutes

Assuming that this e-mail exchange is the kind where each person's response keeps being added to the trail, ideally I would want the final e-mail that I send to have the above fields embedded into it so that if I did want I could export it to a spreadsheet.

If doable would this best be done through a macro? VB?  

Thanks in advance

Who is Participating?
David LeeConnect With a Mentor Commented:
"I only need 3 or 4 fields"
I need to make sure that you understand the difference between fields and properties.  Fields are visual objects (e.g. buttons, checkboxes, radio buttons, text boxes) that appear on a form.  They are part of the interface.  Their purpose is to display data and accept input.  They DO NOT store data.  The information you see in them is lost the instant the form they reside on closes.  Properties are invisible.  Unlike fields they store data.  The two work in concert.  At the sending end fields accept input which is then stored in properties.  At the receiving end fields display the data stored in the item's properties.  

If you want to create fields, then you must create a custom form.  If instead you want to create properties, then you do not need a custom form.  Outlook allows us to add properties to items.  The code in the snippet will add a text property to the currently selected item.  There are a number of property types including one that stores dates.  Having created a property the question then turns to how you fill it in.  How do you want to accomplish that?
Sub AddUserProp()
    Dim olkMsg As Outlook.MailItem, _
        olkProp As Outlook.UserProperty
    Set olkMsg = Application.ActiveExplorer.Selection(1)
    With olkMsg
        'Add a text property'
        Set olkProp = olkMsg.UserProperties.Add("MyPropertyName", olText, True)
        olkProp.Value = "X"
    End With
    Set olkMsg = Nothing
    Set olkProp = Nothing
End Sub

Open in new window

David LeeCommented:
Hi, lineonecorp.

Yes, this is doable.  It'll require a bit of effort to accomplish.  For example, each time you open a message the solution will have to search a log to see if the message has already been recorded.  The same for every reply.  Capturing these actions requires writing a wrapper procedure that monitors all open and reply actions.  The process would be simpler if you opened and replied to these messages using separate menu selections specifically targeted for these purposes.  You can do this via VBA or by writing an Outlook add-in using VB or C.
lineonecorpAuthor Commented:
Thanks for getting to this.

It should be remembered that at the end of all of this there is only going to be one long e-mail that has all the e-mail trail in it.

What I am thinking is that when the first e-mail comes in and is replied to the sender hits some kind of button and three items are recorded right there - as the mail is opened the time from the header of the incoming mail, the current time and the subject line.  When the final 'it's done' e-mail is sent again some kind of button is pushed and that time is added to the record.   I realize now I don't need to calculate the 'time' difference right there - I can do that after I export to Excel.  The trick here is whether the items I am capturing can become part of fields associated with the e-mail itself somehow.  Is it possible to add extra custom fields to an e-mail so that they are retained throughout an e-mail exchange?
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

David LeeCommented:
"Is it possible to add extra custom fields to an e-mail so that they are retained throughout an e-mail exchange?"
It is possible to add additional properties to a message.  I can't guarantee that they can be retained throughout the exchange though.  They should be retained if the other person is using Outlook, but I have no idea if they'd survive in an exchange with a non-Outlook mail client.  
lineonecorpAuthor Commented:
It would be strictly an Outlook only dialog  carried on by participants within an organization using the company e-mail system with the same Outlook client running through Exchange.  How do I add the properties?  And if they are added can their contents at some later time be exported to a spreadsheet?
David LeeCommented:
For this to occur the way you described your best bet is to create a custom Outlook form.  You can add the properties without crating your own form, but filling it in will be a lot more difficult.  Here's a link to the best resource I know of for building a custom Outlook form: http://www.outlookcode.com/article.aspx?ID=35
lineonecorpAuthor Commented:
I would rather add the properties - at the end of the day I only need 3 or 4 fields to accomplish what I want, almost like an attachment to the e-mail. How would I add a couple of additional properties to my basic Outlook message?
lineonecorpAuthor Commented:
Let me look at this and get back to you.
David LeeCommented:
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.