![]() |
Link between contact and task/journal
What field is used to create the link between an Outlook contact and a task
or journal? I need to extract all of the tasks and journals but the name in the links collection doesn't always match if the name of the contact has changed. I know there has to be some way that Outlook uses to link them other than the name because they show up under the contact when I look under tasks or journals on the Activities tab. TIA Matt |
Link between contact and task/journal
The Links collection is the correct field. Each individual Link has an Item property that returns a linked contact, if one exists.
What Outlook version are you working with? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Matt Williamson" wrote in message ... What field is used to create the link between an Outlook contact and a task or journal? I need to extract all of the tasks and journals but the name in the links collection doesn't always match if the name of the contact has changed. I know there has to be some way that Outlook uses to link them other than the name because they show up under the contact when I look under tasks or journals on the Activities tab. TIA Matt |
Link between contact and task/journal
The Links collection is the correct field. Each individual Link has an
Item property that returns a linked contact, if one exists. What Outlook version are you working with? Outlook 2003 Sp2. The problem is that the linked contact doesn't exist, yet there has to be an identifier other than the Item.name, otherwise, how would Outlook know to group them correctly? Example I have a list of tasks for a contact going back for years. During that time, the contact name has changed multiple times. If I click on the contact field in one of the tasks that was linked prior to the name changing, it gives me an error message about it not existing. How does Outlook know to group that Task with that contact on the activity tab after all of the name changes? There has to be some sort of GUID or unique identifier because it isn't the link.item.name any longer. TIA Matt |
Link between contact and task/journal
Outlook stores contact display name (which can change), but also contact
entry id and search key (which do not change unless the contact is recreated) for each link. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Matt Williamson" wrote in message ... The Links collection is the correct field. Each individual Link has an Item property that returns a linked contact, if one exists. What Outlook version are you working with? Outlook 2003 Sp2. The problem is that the linked contact doesn't exist, yet there has to be an identifier other than the Item.name, otherwise, how would Outlook know to group them correctly? Example I have a list of tasks for a contact going back for years. During that time, the contact name has changed multiple times. If I click on the contact field in one of the tasks that was linked prior to the name changing, it gives me an error message about it not existing. How does Outlook know to group that Task with that contact on the activity tab after all of the name changes? There has to be some sort of GUID or unique identifier because it isn't the link.item.name any longer. TIA Matt |
Link between contact and task/journal
Which means that if double-clicking the contact link produces a message that the contact doesn't exist, something has been done to break the link. Just changing the name of the contact would not break the link. In that case, though, I wouldn't expect the task to show up on the Activities page of the contact. Very puzzling to have two conflicting behaviors.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Dmitry Streblechenko" wrote in message ... Outlook stores contact display name (which can change), but also contact entry id and search key (which do not change unless the contact is recreated) for each link. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Matt Williamson" wrote in message ... The Links collection is the correct field. Each individual Link has an Item property that returns a linked contact, if one exists. What Outlook version are you working with? Outlook 2003 Sp2. The problem is that the linked contact doesn't exist, yet there has to be an identifier other than the Item.name, otherwise, how would Outlook know to group them correctly? Example I have a list of tasks for a contact going back for years. During that time, the contact name has changed multiple times. If I click on the contact field in one of the tasks that was linked prior to the name changing, it gives me an error message about it not existing. How does Outlook know to group that Task with that contact on the activity tab after all of the name changes? There has to be some sort of GUID or unique identifier because it isn't the link.item.name any longer. |
Link between contact and task/journal
Outlook stores contact display name (which can change), but also contact entry id I compared the EntryID for each Task linked under the contact and in some cases it is the same, but not always. It's very close though. The last 9-10 bytes change. 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F040000000027490000079FA0FA CC80B448AA2C62138ED23F040000000085F80000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F040000000027490000079FA0FA CC80B448AA2C62138ED23F040000000085F80000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F0400000000274C0000079FA0FA CC80B448AA2C62138ED23F0400000000EDB20000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F0400000000274C0000079FA0FA CC80B448AA2C62138ED23F040000000123FA0000 and search key (which do not change unless the contact is recreated) for each link. I can't find the search key that you are talking about. Is it available through OOM? |
Link between contact and task/journal
The entry ids are ether the same or they are not.
Search keys are not exposed through the Outlook Object Model, but you can look at them using MFCMAPI or OutlookSpy (click IMessage). Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Matt Williamson" wrote in message ... Outlook stores contact display name (which can change), but also contact entry id I compared the EntryID for each Task linked under the contact and in some cases it is the same, but not always. It's very close though. The last 9-10 bytes change. 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F040000000027490000079FA0FA CC80B448AA2C62138ED23F040000000085F80000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F040000000027490000079FA0FA CC80B448AA2C62138ED23F040000000085F80000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F0400000000274C0000079FA0FA CC80B448AA2C62138ED23F0400000000EDB20000 000000001A447390AA6611CD9BC800AA002FC45A0900079FA0 FACC80B448AA2C62138ED23F0400000000274C0000079FA0FA CC80B448AA2C62138ED23F040000000123FA0000 and search key (which do not change unless the contact is recreated) for each link. I can't find the search key that you are talking about. Is it available through OOM? |
Link between contact and task/journal
If Outlook uses the search key to group, and the contact was moved between
folders (that would change the entry id under Exchange but not the search key), this would be exactly the behavior that you see. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Sue Mosher [MVP-Outlook]" wrote in message ... Which means that if double-clicking the contact link produces a message that the contact doesn't exist, something has been done to break the link. Just changing the name of the contact would not break the link. In that case, though, I wouldn't expect the task to show up on the Activities page of the contact. Very puzzling to have two conflicting behaviors. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Dmitry Streblechenko" wrote in message ... Outlook stores contact display name (which can change), but also contact entry id and search key (which do not change unless the contact is recreated) for each link. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Matt Williamson" wrote in message ... The Links collection is the correct field. Each individual Link has an Item property that returns a linked contact, if one exists. What Outlook version are you working with? Outlook 2003 Sp2. The problem is that the linked contact doesn't exist, yet there has to be an identifier other than the Item.name, otherwise, how would Outlook know to group them correctly? Example I have a list of tasks for a contact going back for years. During that time, the contact name has changed multiple times. If I click on the contact field in one of the tasks that was linked prior to the name changing, it gives me an error message about it not existing. How does Outlook know to group that Task with that contact on the activity tab after all of the name changes? There has to be some sort of GUID or unique identifier because it isn't the link.item.name any longer. |
Link between contact and task/journal
The entry ids are ether the same or they are not.
Search keys are not exposed through the Outlook Object Model, but you can look at them using MFCMAPI or OutlookSpy (click IMessage). the PR_SEARCH_KEY field is the same for each task, but it's different for the contact. How do I determine which contact the task belongs to as if I clicked on the contacts, clicked the Activity tab and changed the combo to Tasks. TIA Matt |
Link between contact and task/journal
You need to look at PR_SEARCH_KEY of contacts, not tasks.
The tasks store the contacts search keys in the {00062008-0000-0000-C000-000000000046}, 0x8584, PT_BINARY named property blob. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Matt Williamson" wrote in message ... The entry ids are ether the same or they are not. Search keys are not exposed through the Outlook Object Model, but you can look at them using MFCMAPI or OutlookSpy (click IMessage). the PR_SEARCH_KEY field is the same for each task, but it's different for the contact. How do I determine which contact the task belongs to as if I clicked on the contacts, clicked the Activity tab and changed the combo to Tasks. TIA Matt |
All times are GMT +1. The time now is 11:38 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com