Outlook NAs via Slickrun (was:Slickrun as a poor-man's Quicksilver)

11 views
Skip to first unread message

Marco Vinicio Rodriguez-Vargas

unread,
Mar 3, 2006, 1:04:30 PM3/3/06
to 43Fo...@googlegroups.com
For those of us who use Outlook task list as our NA repository, I made
the following vbs script to have the same functionality as the one
described by this post.

2006/2/24, GTD Wannabe <gtdwa...@gmail.com>:
>
> Someone's already posted a comment to my blog post [1] about this. In
> it, they show how they use exactly one magicword "@" and make the
> context part of the parameter. So they would enter
>
> @ CODE - implement foobar widget
>
> to get
>
> @CODE - implement foobar widget
>
> A couple of more characters on the input side, but saves you from
> having to create multiple magic words. I thought it was an elegant
> refinement. Note: to try it, I had to name my magicword @@, probably
> because there was no way to make @ unique with the other magicwords.
>
> [1] http://gtdwannabe.blogspot.com/
>

The script follows (just cut and paste onto notepad and save as "@.vbs"):

'@.vbs
'first argument is context, it gets saved on the categories field of the task
'the other arguments are the subject of the task
'if no arguments or only the context are passed, the task form is displayed
'otherwise the task is silently created
Dim S
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(3)
Set myArgs = WScript.Arguments
if myArgs.Count > 0 then
myItem.Categories = "@" + myArgs(0)
if myArgs.Count > 1 then
S = ""
For i = 1 to myArgs.Count-1
S = S + " " + myArgs(i)
Next
myItem.Subject = S
myItem.Save
End if
End if
if myArgs.Count < 2 then myItem.Display
'end @.vbs

Slickrun setup:

MagicWord: @
Filename: @.vbs
Startup Path: <where you saved @.vbs>

Usage:

@ [CONTEXT] [NEXT ACTION]

Note the space after @. No quotes are necessary unless the context
has more than one word.

HTH

Regards
--
Marco V. Rodríguez Vargas

Helmut Granda

unread,
Mar 3, 2006, 2:45:22 PM3/3/06
to 43Fo...@googlegroups.com
Marco,

Thanks for the script, just for those of use who are not familiar with installing VBS scripts, how would we go about that?

Thanks!
Helmut

Marco Vinicio Rodriguez-Vargas

unread,
Mar 3, 2006, 3:20:32 PM3/3/06
to 43Fo...@googlegroups.com
vbs scripts are alike batch (.bat) files, they are normal text files
that can be made with the built-in Notepad program. There is no
installation needed, you just copy them to some appropriate folder.

For this specific case, the easiest way is:

1. Select from the line that says '@.vbs to the line that says 'end @.vbs
2. Copy the selection (Ctrl-C)
3. Open Notepad
4. Paste the selection (Ctrl-V)
5. Save the Notepad File as "@.vbs" and note the location where it was saved.

Please note that this need that the Windows Scripting Host be
available, this is normally installed with Windows but some business's
IT staff may disable it for security reasons.

HTH, Marco


2006/3/3, Helmut Granda <gra...@gmail.com>:

Helmut Granda

unread,
Mar 3, 2006, 4:46:05 PM3/3/06
to 43Fo...@googlegroups.com
Thanks Marco, I understood the basics from the begining (copy and paste...) my confusion is how do we get Outlook to reconginze this file? is there any specific area in Windows where we need to put this file at?

I think those questions will be answered with a quick google search, but I just wanted to clarify for those of use who never used vbs files, we might just try to save the file on the desktop and hope for it to run by itself LOL :)

Thanks again for the great work!

Marco Vinicio Rodriguez-Vargas

unread,
Mar 3, 2006, 5:06:52 PM3/3/06
to 43Fo...@googlegroups.com
OK, I get it now, sorry for the misunderstanding.

Outlook is unaware of this script, it only responds to "someone"
asking it to create a task. The objective of the script is to create
a task from the command prompt since this is the way SlickRun needs
it.

IOW, the functionality of calling Outlook from a script is built in in
Outlook, in fact in the whole MS Office. BTW I tested this only in
Outlook 2003; the Office Automation documentation I used to find the
commands referred to OL 2000 so it should work from that version on,
it *might* work on older versions.

Regards, Marco.

2006/3/3, Helmut Granda <gra...@gmail.com>:

Bryan Ewbank

unread,
Mar 3, 2006, 6:47:56 PM3/3/06
to 43Fo...@googlegroups.com
Hard to believe it is really that easy, but it really works. Anyone
using Outlook should be happy for this lightweight interface to create
tasks. Honestly, it's almost enough to make me abandon Palm Desktop
and sync with Outlook..

Wonderful job, Marco! +3 GTD

- Bryan

GTD Wannabe

unread,
Mar 3, 2006, 7:05:59 PM3/3/06
to 43 Folders
Wow, that's beautiful! Excellent work - I can't wait to play with
it!!! :)

Marco Vinicio Rodriguez-Vargas

unread,
Mar 3, 2006, 8:01:33 PM3/3/06
to 43Fo...@googlegroups.com
Thank you all for your comments, it was really fun to make this little thing.

Regards, Marco.

jack

unread,
Mar 6, 2006, 2:45:26 PM3/6/06
to 43 Folders
I get an error message stating:

Line:7 Char:1 Error: The specified module could not be found. Code:
8007007E. Source: (null)

I have Oulook 2003 installed as well as WSH 5.5.

Marco Vinicio Rodriguez-Vargas

unread,
Mar 6, 2006, 3:24:12 PM3/6/06
to 43Fo...@googlegroups.com
Jack:

Could you send me your vbs file offlist to marcovrv<at>gmail.com to
take a look of what is in your seventh line?

Regards, Marco.

2006/3/6, jack <jack...@gmail.com>:

jack

unread,
Mar 7, 2006, 4:22:57 PM3/7/06
to 43 Folders
Marco fixed my issue. I had to change the following:

Set myOlApp = CreateObject("Outlook.Application")

To...

Set myOlApp = CreateObject("Outlook.Application","localhost")

Works like a charm now

S. William Schulz

unread,
Mar 7, 2006, 4:33:01 PM3/7/06
to 43Fo...@googlegroups.com
On 3/7/06, jack <jack...@gmail.com> wrote:
>
> Marco fixed my issue. I had to change the following:
>
> Set myOlApp = CreateObject("Outlook.Application")
>
> To...
>
> Set myOlApp = CreateObject("Outlook.Application","localhost")

Is there a good online reference for interacting with Outlook via the
WSH? I've rewritten part of the original post with the intent of
adding the due date as well, but I'd love to see what else is
possible.

Paul Broadwith

unread,
Mar 7, 2006, 5:12:23 PM3/7/06
to 43Fo...@googlegroups.com
Just noticed this thread and thought I'd let you know what I do.

I have four different magic words setup in Slickrun which create a new
calendar entry, a new task, a new mail or a new note.

All you have to do in Slickrun is setup the program as the normal
outlook.exe file (in may case it's C:\PROGRAM FILES\MICROSOFT
OFFICE\OFFICE11\OUTLOOK.EXE ) and in the parameters box enter one of the
following:

/c ipm.apppointment
/c ipm.note
/c ipm.task

ipm.appointment is for calendar
ipm.note is for a new email
ipm.task is for a new task

Nothing is pre-filled but it's quick and works.

Kind regards,

Paul Broadwith MBCS
Blue Ivy Ltd
Tel.: 0800 612 0601
Messenger: paul.br...@blueivy.co.uk
Web: http://www.blueivy.co.uk

Find out if you could save money over your current broadband provider by going to http://www.whatsthepigfor.info/broadband

For other low cost utility services go to http://www.whatsthepigfor.info

Blue Ivy Limited is an Authorised Distributor of The Utility Warehouse Discount Club.


jack

unread,
Mar 7, 2006, 5:46:10 PM3/7/06
to 43 Folders
S. William Schulz wrote:
> Is there a good online reference for interacting with Outlook via the
> WSH? I've rewritten part of the original post with the intent of
> adding the due date as well, but I'd love to see what else is
> possible.

Here's a good starting point.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landoffice03_vba.asp

If you have time to post your change to the script in order to get the
due date that would be great.

S. William Schulz

unread,
Mar 7, 2006, 10:01:20 PM3/7/06
to 43Fo...@googlegroups.com
On 3/7/06, jack <jack...@gmail.com> wrote:
>

Thanks for the pointer... That'll give me something to snoop through tomorrow.

> If you have time to post your change to the script in order to get the
> due date that would be great.

Here is the modified script I'm using. The functionality is changed
slightly, mainly to make it easy to determine if there is a date
included. To that end, this version requires that the subject field
be enclosed in double-quotes so that the script sees it as one
argument. As in the original version, entering either an '@' alone,
or an @ and a category with no subject will display a Task form.
Including a subject and (optionally) a date will cause it to be
silently added (no popup). An entry now looks like:

@ Phone "Call Jack and ask for better pricing" 2006-03-08

Unfortunately, when using this method it seems that one is not able to
use the today/tomorrow/Wednesday shorthand available in Outlook
directly.

'@.vbs
'first argument is context, it gets saved on the categories field of the task
'the other arguments are the subject of the task
'if no arguments or only the context are passed, the task form is displayed
'otherwise the task is silently created

' SWS Modifications: Added DueDate, modified subject entry method
' Usage: @ [Category] ["subject"] [date]
'
Dim S
Dim D

Set myOlApp = CreateObject("Outlook.Application")

Set myItem = myOlApp.CreateItem(3)
Set myArgs = WScript.Arguments

if myArgs.Count > 0 then
myItem.Categories = "@" + myArgs(0)
if myArgs.Count > 1 then

myItem.Subject = myArgs(1)
if myArgs.Count > 2 Then
myItem.DueDate = myArgs(2)
End If


myItem.Save
End if
End if

if myArgs.Count < 2 then myItem.Display
'end @.vbs

SWS

Reply all
Reply to author
Forward
0 new messages