By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Bew task in MS Outlook

P: n/a
Hi All,

does anyone have the sequence of commands
to add a new task to an outlook task list using
the outlook Object Model.

I've tried a few things but I can't ssem to get
it quite right.

He is what I have so far.

Dim oNS As Outlook.NameSpace = outlookApp.GetNamespace("mapi")
oNS.Logon([profileName], Missing.Value, False, True)
Dim oTask As Outlook.TaskItem =
outlookApp.CreateItem(Outlook.OlItemType.olTaskIte m)
oTask.Subject = "Test Task"
oTask.StartDate = "18/07/2004"
oTask.Owner = "james, jason"
oTask.Assign()
oTask.Send()
oTask = Nothing
oNS = Nothing
Thanks,

Jason.
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I managed to find what I was looking for in
the outlook VBA help and ported it
to VB.NET as follows:

Dim oNS As Outlook.NameSpace = outlookApp.GetNamespace("mapi")
oNS.Logon("Corporate Email", Missing.Value, False, True)
Dim oTask As Outlook.TaskItem =
outlookApp.CreateItem(Outlook.OlItemType.olTaskIte m)
oTask.Assign()
Dim myDelegate As Outlook.Recipient =
oTask.Recipients.Add("james, jason")
oTask.Subject = "Complete Project Plan"
oTask.DueDate = "19/07/2004"
oTask.Owner = "james, jason"
oTask.Send()
oTask = Nothing
oNS = Nothing

Thanks,

Jason.

On Sat, 17 Jul 2004 16:09:24 GMT, ja***@no-spam.dive-master.org (Jason
L James) wrote:
Hi All,

does anyone have the sequence of commands
to add a new task to an outlook task list using
the outlook Object Model.

I've tried a few things but I can't ssem to get
it quite right.

He is what I have so far.

Dim oNS As Outlook.NameSpace = outlookApp.GetNamespace("mapi")
oNS.Logon([profileName], Missing.Value, False, True)
Dim oTask As Outlook.TaskItem =
outlookApp.CreateItem(Outlook.OlItemType.olTaskIt em)
oTask.Subject = "Test Task"
oTask.StartDate = "18/07/2004"
oTask.Owner = "james, jason"
oTask.Assign()
oTask.Send()
oTask = Nothing
oNS = Nothing
Thanks,

Jason.


Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.