View Single Post
  #4  
Old July 27th 09, 06:11 PM posted to microsoft.public.outlook.program_vba
yannickestrada
external usenet poster
 
Posts: 13
Default Creating a Task with VBScript

I get the error when I call: colLinks.Add(Item)



"yannickestrada" wrote:

Thanks I was traying to do the opposite.

But my new code doesn´t seems to work neither.

Set myTask = Application.CreateItem(3)
myTask.Subject = "..."
myTask.DueDate #17/08/09#

myTask.Save

Set colLinks = myTask.Links
colLinks.Add(Item)

How I get the current form as a ContactItem is not enough with Item?

Regards.

"Ken Slovak - [MVP - Outlook]" wrote:

You need the contact as a ContactItem. Then get the Links collection of the
new task item and add that ContactItem to the Links collection of the task
using the Links.Add method.

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


"yannickestrada" wrote in message
...
Regards.

Hi I´m trying to create a task in a custom Contact form in Outlook. I
would
like that the task appears in the Activities tab, but I only get to create
the task in the session, can´t associate with the current contact form.

How I can do that?

I was trying to link the Task Item with the contact form bu that don´t
seems
to work.

Thanks for your help.
Yannick



Ads