473,387 Members | 1,295 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Bew task in MS Outlook

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
1 1326
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nicholas Then | last post by:
I have a web application that has an area for users to have suspenses (same as tasks). However this is just database controlled. Is there a way that I can create an Outlook Task with ASP.net so...
1
by: Ramón | last post by:
why am I not allowed to intanstiate a new task item? TaskItem task_DC = new TaskItemClass(); This is the erro I get when building: error CS0122:...
1
by: Rob McCaughey | last post by:
Hi all! I'm a VB newbie, and trying to send an Outlook Task automatically without user intervention in a VB application. When I use the following code, if I enable the send portion (see code...
0
by: William | last post by:
Hi there, Is there anybody here who ever create outlook task item from asp .net script successfully ? Actually I've created the script for creating the task, and it run successfully from the...
5
by: Imry | last post by:
Is there a way to programatically add items to the outlook task list using VB ..net?
4
by: digger27 | last post by:
I am trying to progamatically create tasks in Outlook using VB.Net. I am using the following code: **** Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
4
by: Blaine | last post by:
Does anyone know how I can hide a form from the TaskManager? I've set the ShowInTaskbar to False, but when using Alt-TAB to switch between applications, it appears as a blank icon. I can set it...
1
by: The Facilitator | last post by:
Hello all, I am trying to find out what the field is in Outlook that holds all the people's email addresses for when the final completed task report is sent. Where is it and how can I access it...
3
Shakss2
by: Shakss2 | last post by:
Hi, I have a application which creates a task in outlook on the click of a button. I have made set reminder true. It works fine when it tried on the desktop. But wne tried the same...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.