Conversation ID of Outlook emails
Each email in Outlook has a Conversation ID associated with it that allows it to be related to other messages in the same thread. The ID is a 44 alphanumeric code. You can use this Visual Basic code in Outlook to get the Conversation ID of an email you have selected in Outlook:
Dim obj As Object Dim msg As Outlook.MailItem
Set obj = GetCurrentItem
If TypeName(obj) = "MailItem" Then Set msg = obj MsgBox msg.ConversationID End If
Function GetCurrentItem() As Object ' returns reference to current item, either the one ' selected (Explorer), or the one currently open (Inspector)
Select Case True Case IsExplorer(Application.ActiveWindow) Set GetCurrentItem = ActiveExplorer.Selection.Item(1) Case IsInspector(Application.ActiveWindow) Set GetCurrentItem = ActiveInspector.CurrentItem End Select
End Function Function IsExplorer(itm As Object) As Boolean IsExplorer = (TypeName(itm) = "Explorer") End Function Function IsInspector(itm As Object) As Boolean IsInspector = (TypeName(itm) = "Inspector") End Function
1. Simply enter Visual Basic in Outlook by pressing ATL + F11, and then create a new module in the Project list by right clicking on the Modules folder and selecting Insert . . . Module.
2. Paste the code in and then press the play button and choose GetConvID
3. I message box will appear like this one showing the Conversation ID.
Thanks to Jimmy Pena for posting this code here.