?
Solved

Create an Outlook task from a command line

Posted on 2003-03-03
3
Medium Priority
?
351 Views
Last Modified: 2013-12-28
We currently use "BLAT" to create e-mails from a DOS batch file. I would like to know if there are any similar utilities that will allow me to create an Outlook task from a command line ?
0
Comment
Question by:IanRBrooks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
bonzai earned 400 total points
ID: 8056658
hi IanRBrooks

save this vbscript in a textfile named createOLtask.vbs

'------------------begin script---------------------
Set objArgs = WScript.Arguments
Dim objOutlook, itmtask, tmpbody, bodylen, body

Const olTaskItem = 3

Set objOutlook = CreateObject("Outlook.application")
Set itmTask = objOutlook.CreateItem(olTaskItem)

For each strArg in objArgs
     subject = (strArg)
     tmpBody = tmpBody & (strArg) + chr(32)
Next

bodylen = instr(1,tmpBody,subject,1)
body = mid(tmpBody,1,bodylen-1)
 
itmTask.Subject = subject
itmtask.body = body
itmTask.save

Set itmTask = Nothing
Set objOutlook = Nothing
'---------------------end script---------------------

you wrote, that you would create the task with a batchfile, so start this script with following parameters:

-----------
c:\>createOLtask.vbs some text, some more text ThisIsToDo
-----------

this will create you an outlook task with the Subject "ThisIsToDo" (last parameter) and with the body "some text, some more text" (everything before the last parameter)

hope you understand by bad english :-)

greets
Bonzai
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question