A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Related items in VBA Code



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 28th 07, 04:54 PM posted to microsoft.public.outlook
David
external usenet poster
 
Posts: 5
Default Related items in VBA 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
Ads
  #2  
Old November 28th 07, 05:05 PM posted to microsoft.public.outlook
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Related items in VBA Code

Please do not multipost. I answered your question in the
microsoft.public.office.developer.outlook.vba group.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"David" 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Asigning a color category to all items related to a contact Russell Outlook - Using Contacts 1 June 23rd 07 02:13 PM
Help - another question related to rules - automaticaly responses not showing up in Sent Items. Dab Outlook - General Queries 2 September 13th 06 01:48 AM
Help with Code - Creating Status Report from Task items Steve Outlook and VBA 1 August 2nd 06 06:45 AM
Calander related question Vic Abrahamian Outlook - Installation 0 February 10th 06 08:38 PM
Winmail.dat - NOT RTF related [email protected] Outlook - General Queries 3 January 13th 06 12:28 AM


All times are GMT +1. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.