![]() |
Contacts Linked to Other Items Through Code
We would like to add Contacts through VBA code. Easy enough. We
would also like to add Tasks, Calendar Items, Notes, and Journal Items through VBA code that are related to the contacts in question. We are using Outlook 2003. We can get as far as adding the Contacts, and then we can add Tasks, because Tasks have a read/write property of ContactNames, so if I create a Contact and name it after myself, relating a task to my new contact takes one line of code: tsk1.ContactNames = "David" Doing the same with a Journal item should be easy, but it's not, because doing this: jrn1.ContactNames = "David" doesn't work, i.e. the journal entry is created, but it does not show up in the Contact's activity screen. Appointment items and Note items do not seem to have a similar "ContactNames" property. So the question is this: Is there a way to create Tasks, Appointments, Notes, and Journal items through VBA code that relate back to contacts? Any code samples would be appreciated greatly! Thank you! David |
Contacts Linked to Other Items Through Code
You should post this to the programming group.
-- Russ Valentine [MVP-Outlook] wrote in message ... We would like to add Contacts through VBA code. Easy enough. We would also like to add Tasks, Calendar Items, Notes, and Journal Items through VBA code that are related to the contacts in question. We are using Outlook 2003. We can get as far as adding the Contacts, and then we can add Tasks, because Tasks have a read/write property of ContactNames, so if I create a Contact and name it after myself, relating a task to my new contact takes one line of code: tsk1.ContactNames = "David" Doing the same with a Journal item should be easy, but it's not, because doing this: jrn1.ContactNames = "David" doesn't work, i.e. the journal entry is created, but it does not show up in the Contact's activity screen. Appointment items and Note items do not seem to have a similar "ContactNames" property. So the question is this: Is there a way to create Tasks, Appointments, Notes, and Journal items through VBA code that relate back to contacts? Any code samples would be appreciated greatly! Thank you! David |
All times are GMT +1. The time now is 05:32 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