![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Which Mailitem property stores the fact that a received Mailitem has been
replied to? I need to distinguish programatically between duplicate Mailitems: 1. Some mailitems show "You replied on ... Click here to find all related messages". 2. Duplicate mailitems in the same folder are exactly the same except they do not show the above message. I have written a VBA program that scans thousands of emails in multiple stores and folders. The program finds duplicate Mailitems in the same folder (by comparing SenderName, To, ReceivedTime, SentOn, Subject and Attachments.Count). I want to delete the duplicates that don't show the "You replied on..." message. I hope there's a property that stores this "replied" information. Does it exist? Is there a way to distinguish? TIA Geoff |
Ads |
#2
|
|||
|
|||
![]()
The property you're looking for isn't exposed in the Outlook object model.
It's in PR_LAST_VERB_EXECUTED (0x10810003), where replied to is 102. You'd need to be using CDO 1.21 or Extended MAPI or a MAPI wrapper such as Redemption (www.dimastr.com/redemption) to get at it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Which Mailitem property stores the fact that a received Mailitem has been replied to? I need to distinguish programatically between duplicate Mailitems: 1. Some mailitems show "You replied on ... Click here to find all related messages". 2. Duplicate mailitems in the same folder are exactly the same except they do not show the above message. I have written a VBA program that scans thousands of emails in multiple stores and folders. The program finds duplicate Mailitems in the same folder (by comparing SenderName, To, ReceivedTime, SentOn, Subject and Attachments.Count). I want to delete the duplicates that don't show the "You replied on..." message. I hope there's a property that stores this "replied" information. Does it exist? Is there a way to distinguish? TIA Geoff |
#3
|
|||
|
|||
![]()
Hi Ken,
Many thanks. I'll give it a go tomorrow. I have CDO and Redemption installed. Thanks too for your previous help and book recommendations. Sorry I didn't reply. In fact, I drafted a reply (ie some thoughts on Automation etc), but thought twice before posting. I'm not sure comments (from my limited perspective) are necessarily welcome to a more-knowledgeable wider audience. I'll give it some more thought and maybe pluck up courage! Thanks again. Regards Geoff "Ken Slovak - [MVP - Outlook]" wrote in message ... The property you're looking for isn't exposed in the Outlook object model. It's in PR_LAST_VERB_EXECUTED (0x10810003), where replied to is 102. You'd need to be using CDO 1.21 or Extended MAPI or a MAPI wrapper such as Redemption (www.dimastr.com/redemption) to get at it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Which Mailitem property stores the fact that a received Mailitem has been replied to? I need to distinguish programatically between duplicate Mailitems: 1. Some mailitems show "You replied on ... Click here to find all related messages". 2. Duplicate mailitems in the same folder are exactly the same except they do not show the above message. I have written a VBA program that scans thousands of emails in multiple stores and folders. The program finds duplicate Mailitems in the same folder (by comparing SenderName, To, ReceivedTime, SentOn, Subject and Attachments.Count). I want to delete the duplicates that don't show the "You replied on..." message. I hope there's a property that stores this "replied" information. Does it exist? Is there a way to distinguish? TIA Geoff |
#4
|
|||
|
|||
![]()
Hi Ken,
I'm making great progress thanks to your earlier help! I have a couple of more questions, if I may. Using VBA and CDO 1.21 in Outlook, I'm sending a MAPI.Fields collection for an Outlook Mailitem to a function containing the following code: Dim lngValue as Long lngValue = &H10810003 Set objOneField = objMAPIFieldsColl.item(lngValue) As you mentioned, if the Mailitem has been replied to, then objOneField.Value is 102. If the Mailitem has not been replied to, the last code line above generates a run-time error. My questions a 1. Am I right in assuming that the run-time error occurs because, when a Mailitem has not been replied to, the field in question simply does not exist? Can I trap the error and assume that the Mailitem has not been replied to? 2. If a run-time error is not generated, I then get access to the field. Do I have to ensure that its Value property is 102 before I can assume that the Mailitem has been replied to? I'm wondering if the Value property could contain other values that would mean other things. Very many thanks for getting me this far. Regards Geoff "Ken Slovak - [MVP - Outlook]" wrote in message ... The property you're looking for isn't exposed in the Outlook object model. It's in PR_LAST_VERB_EXECUTED (0x10810003), where replied to is 102. You'd need to be using CDO 1.21 or Extended MAPI or a MAPI wrapper such as Redemption (www.dimastr.com/redemption) to get at it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Which Mailitem property stores the fact that a received Mailitem has been replied to? I need to distinguish programatically between duplicate Mailitems: 1. Some mailitems show "You replied on ... Click here to find all related messages". 2. Duplicate mailitems in the same folder are exactly the same except they do not show the above message. I have written a VBA program that scans thousands of emails in multiple stores and folders. The program finds duplicate Mailitems in the same folder (by comparing SenderName, To, ReceivedTime, SentOn, Subject and Attachments.Count). I want to delete the duplicates that don't show the "You replied on..." message. I hope there's a property that stores this "replied" information. Does it exist? Is there a way to distinguish? TIA Geoff |
#5
|
|||
|
|||
![]()
You can check for IsEmpty() for fields that may not be there by default.
There are other verbs that could be there in the field, such as EXCHIVERB_REPLYTOALL or EXCHIVERB_FORWARD , so check for a value of 102. EXCHIVERB_REPLYTOALL (103) is set if ReplyToAll was used last, EXCHIVERB_FORWARD (104) is set if Forward was used last. The value will change as different actions are taken. If an item was replied to the field value would be 102. If then you forwarded the same item it would change to 104. The field only captures the last action taken. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Hi Ken, I'm making great progress thanks to your earlier help! I have a couple of more questions, if I may. Using VBA and CDO 1.21 in Outlook, I'm sending a MAPI.Fields collection for an Outlook Mailitem to a function containing the following code: Dim lngValue as Long lngValue = &H10810003 Set objOneField = objMAPIFieldsColl.item(lngValue) As you mentioned, if the Mailitem has been replied to, then objOneField.Value is 102. If the Mailitem has not been replied to, the last code line above generates a run-time error. My questions a 1. Am I right in assuming that the run-time error occurs because, when a Mailitem has not been replied to, the field in question simply does not exist? Can I trap the error and assume that the Mailitem has not been replied to? 2. If a run-time error is not generated, I then get access to the field. Do I have to ensure that its Value property is 102 before I can assume that the Mailitem has been replied to? I'm wondering if the Value property could contain other values that would mean other things. Very many thanks for getting me this far. Regards Geoff |
#6
|
|||
|
|||
![]()
Hi Ken,
Very many thanks. The field only captures the last action taken. It was important for me to know that to solve my present problem. Thanks for that. You can check for IsEmpty() for fields that may not be there by default. Where am I going wrong please? When the PR_LAST_VERB_EXECUTED property does not exist (in the MAPI fields collection for an Outlook Mailitem), the following code line produces a run-time error (not as I expected FALSE): "If IsEmpty(objMAPIFields.item(&H10810003)) Then" But if I precede the above code line with: "On Error Resume Next" then the IsEmpty() function returns TRUE. How did you mean I should use IsEmpty() please and what's going on above? Just FMI, where would the following detailed information be stored: "You replied on 15/10/2006 01:52. Click here to find all related messages." TIA, Regards Geoff "Ken Slovak - [MVP - Outlook]" wrote in message ... You can check for IsEmpty() for fields that may not be there by default. There are other verbs that could be there in the field, such as EXCHIVERB_REPLYTOALL or EXCHIVERB_FORWARD , so check for a value of 102. EXCHIVERB_REPLYTOALL (103) is set if ReplyToAll was used last, EXCHIVERB_FORWARD (104) is set if Forward was used last. The value will change as different actions are taken. If an item was replied to the field value would be 102. If then you forwarded the same item it would change to 104. The field only captures the last action taken. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm |
#7
|
|||
|
|||
![]()
Use the On Error Resume Next before testing for IsEmpty.
ConversationIndex and ConversationTopic. All items in a thread have the same ConversationTopic and each one gets a Windows time struct of 8 bytes appended to the previous ConversationIndex. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Hi Ken, Very many thanks. The field only captures the last action taken. It was important for me to know that to solve my present problem. Thanks for that. You can check for IsEmpty() for fields that may not be there by default. Where am I going wrong please? When the PR_LAST_VERB_EXECUTED property does not exist (in the MAPI fields collection for an Outlook Mailitem), the following code line produces a run-time error (not as I expected FALSE): "If IsEmpty(objMAPIFields.item(&H10810003)) Then" But if I precede the above code line with: "On Error Resume Next" then the IsEmpty() function returns TRUE. How did you mean I should use IsEmpty() please and what's going on above? Just FMI, where would the following detailed information be stored: "You replied on 15/10/2006 01:52. Click here to find all related messages." TIA, Regards Geoff |
#8
|
|||
|
|||
![]()
Very many thanks.
I see - neat. I think I'm nearly home and dry. Where would we be without people like you? Quite lost! I'm very grateful. Regards Geoff "Ken Slovak - [MVP - Outlook]" wrote in message ... Use the On Error Resume Next before testing for IsEmpty. ConversationIndex and ConversationTopic. All items in a thread have the same ConversationTopic and each one gets a Windows time struct of 8 bytes appended to the previous ConversationIndex. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Geoff" wrote in message ... Hi Ken, Very many thanks. The field only captures the last action taken. It was important for me to know that to solve my present problem. Thanks for that. You can check for IsEmpty() for fields that may not be there by default. Where am I going wrong please? When the PR_LAST_VERB_EXECUTED property does not exist (in the MAPI fields collection for an Outlook Mailitem), the following code line produces a run-time error (not as I expected FALSE): "If IsEmpty(objMAPIFields.item(&H10810003)) Then" But if I precede the above code line with: "On Error Resume Next" then the IsEmpty() function returns TRUE. How did you mean I should use IsEmpty() please and what's going on above? Just FMI, where would the following detailed information be stored: "You replied on 15/10/2006 01:52. Click here to find all related messages." TIA, Regards Geoff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Deleting duplicate diary entries ??? | Hi-Soft | Outlook - General Queries | 0 | August 26th 06 05:37 PM |
Deleting Duplicate holidays | Charles C. Perkins | Outlook - Calandaring | 3 | August 17th 06 08:51 PM |
How To: select mailitems from my inbox? | NFR | Outlook - Using Forms | 1 | May 16th 06 04:41 PM |
How to work with MailItems after pressing Send-Button | Darius | Add-ins for Outlook | 5 | January 20th 06 04:27 PM |
Deleting a Custom From | Chaplain Doug | Outlook - Using Forms | 1 | January 12th 06 05:25 AM |