by Jan Verhoeven, 11 November 2001
Following some simple rules you can use Outlook 2000 for project control within your company.
You may be suprised that this is all. The key aspect here is the concept of making a project a category and of synchronizing the master category list between users.
Outlook has no central list of categories. Each user has in its own registry the following key:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Categories\MasterList
The value of this key is a string enclosed in double quotes and the items
seperated by a semi-colon:
"Important dates;Important
customer;Competition;Holiday"
We can write a VBScript that can be run under the windows scripting host and that will read a simple text file with categories and store these categories in the user's registry.
Next we drag this script as a shortcut on the Outlook bar and presto!.
The only thing the user has to do is click the shortcut to synchronize his registry setting for the categories with the central list.
You may have noticed that when you click the contacts button in the form of outlook item, you have to navigate thru a range of folders to get to the contacts folder and to select the contact of interest. There is a much quicker way.
Suppose you want to enter Jan Verhoeven as the contact but are not sure about the exact spelling. Just enter jan. When you save and close the item, Outlook will present you with a list of contacts that match jan, and you can select the correct one.
If you enter more comma seperated contacts, you can follow the same method. If the contacts are collegues, which will be likely in case of project tasks, just enter their first name. Don't bother about upper or lowercase.
Below you find a VBScript ready to cut, paste and use. Just open Notepad, copy the text below, paste it into Notepad and save it at a central location on your network as outlook-categories-masterlist.vbs. In the same folder you store a text file names outlook-categories-masterlist.txt with one category on each line.
You could modify the script so that any existing categories in the user's registry are maintained, although in general when working with a group it is best that all people have the same list.
If you wonder how I did get the syntax highlighted text in this article, then try my BackEdit program. It has a function that allows you to copy selected text in a script as formatted html to the clipboard, retaining any syntax highlighting.
'script to load an Outlook Master Category
List
'File name: outlook-categories-masterlist.vbs
'Author: Jan
Verhoeven
'URL: http://jansfreeware.com
Const
ForReading = 1 ,ForWriting = 2
set fso= WScript.createObject("Scripting.FileSystemObject")
thepath=WScript.ScriptFullName
p=instrRev(thepath,"\")
catfile=left(thepath,p) & "outlook-categories-masterlist.txt"
if
fso.fileexists(catfile)
then
Set f = fso.OpenTextFile(catfile,
ForReading)
catlist=f.readall
f.close
doproc(catlist)
else
msgbox(catfile & " does not exist")
end if
set fso=nothing
sub
doproc(alist)
if alist=""
then exit sub
ar=split(alist,vbcrlf)
'remove empty lines
reglist=""
for
i=0 to ubound(ar)
itm=trim(ar(i))
if
itm<>""
then
if
reglist=""
then
reglist=itm
else
reglist=reglist & ";" &
itm
end
if
end if
next
'now write to
registry
keyname="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Categories\MasterList"
set shell= WScript.createObject("WScript.Shell")
shell.regwrite keyname, reglist
set shell=nothing
end sub