Outlook tasks

M

mmethe

Outlook XP in use.

I ma trying to add tasks based on a 3rd part help desk application. I
am using the script below to successfully take the data passed to it
and add an Outlook Task.

****CODE*****
Const olTaskItem = 3

Dim objArgs
Dim prob, id, due, time

Set objArgs = WScript.Arguments

prob = WScript.Arguments.Item(0)
desc = WScript.Arguments.Item(1)
due = WScript.Arguments.Item(2)
time = WScript.Arguments.Item(2)

Wscript.Echo prob
Wscript.Echo id
Wscript.Echo due
Wscript.Echo time

Set objOutlook = CreateObject("Outlook.Application")
Set objTask = objOutlook.CreateItem(olTaskItem)

objTask.Subject = prob
objTask.Body = "See WorkOrder #" & WScript.Arguments.Item(1)
objTask.ReminderSet = True
objTask.ReminderTime = time
objTask.DueDate = due
objTask.ReminderPlaySound = True
objTask.ReminderSoundFile = "C:\Windows\Media\Ding.wav"

objTask.Save
**** End Code ******

The problem with this is that it adds the task to the user that click
the button in the HelpDesk app! Not good. It should add it to the
assinged to value which correspinds to Active Dir user name which gets
me to the mailbox. Sounds like this should be possible but I just cnat
figure out how to get there!

Need more info?

Thanks in advance!

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top