Function GetConv(mailItem As Outlook.MailItem) Dim Conversation As Outlook.Conversation ' Get the conversation Dim Items As Outlook.SimpleItems Dim expMessage$ ' // If Item = a MailItem. Try If TypeOf (mailItem) Is Outlook.MailItem Then Conversation = mailItem.GetConversation If Not IsNothing(Conversation) Then Items = Conversation.GetChildren(mailItem) GetConv = Items.Count End If Else GetConv = 0 End If Catch ex As SystemException expMessage = ex.Message MsgBox(expMessage) GetConv = 0 End Try End Function
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.