Hi All
I need help with the code to identify the Entry ID of the mail being replied. Appreciate any help.
Thanks
Hi All
I need help with the code to identify the Entry ID of the mail being replied. Appreciate any help.
Thanks
To explain, I am looking to identify the parent mail of the reply/forwarded mail while it is being drafted.
This is discussed in http://dailydoseofexcel.com/archives/category/Outlook/ It looks wonky, but he (who is no fool) attributes the method to Sue Mosher (who is a high guru on Outlook). Read the whole [short] article which explains the process.
I just found a cool semi-advanced VBA page - dictionary, queue, etc. http://analystcave.com/excel-vba-dic...ta-structures/
Thanks for your reply. I have adapted the code but am unable to retrieve the Entry ID using the propertyaccessor. It is returning blank. Can you help point out where I am getting it wrong.
Function FindParentMessageID(objMsg As Outlook.MailItem) As String Dim sFind As String Dim sIndex As String Dim olFldr As Outlook.MAPIFolder Dim olItems As Outlook.Items Dim olMi As Object Dim objPA As Outlook.PropertyAccessor sIndex = Left$(objMsg.ConversationIndex, Len(objMsg.ConversationIndex) - 10) If Application.ActiveInspector Is Nothing Then Set olFldr = Application.ActiveExplorer.Selection.Item(1).Parent Else Set olFldr = Application.ActiveInspector.CurrentItem.Parent End If sFind = "[ConversationTopic] = " & Chr$(34) & objMsg.ConversationTopic & Chr$(34) Set olItems = olFldr.Items.Restrict(sFind) For Each olMi In olItems If olMi.Class = olMail Then If Left(olMi.ConversationIndex, Len(sIndex)) = sIndex Then Set objPA = olMi.PropertyAccessor FindParentMessageID = objPA.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x1035" & PT_STRING8) Set objPA = Nothing Exit For End If End If Next olMi End Function
Sorry, your code (e.g. using PropertyAccessor) is a little too elaborate for me. I know the Daily Dose code works, especially as modified in the comments there, which I use regularly.
Anyone who understands the PropertyAccessor code in your post above, please help him!
I just found a cool semi-advanced VBA page - dictionary, queue, etc. http://analystcave.com/excel-vba-dic...ta-structures/