Solved

Creation of public categories for all end users of outlook 2007 calendars

Posted on 2009-05-04
5
519 Views
Last Modified: 2012-05-06
Having a little issue with Microsoft Office 2007 and calendars.

We would like to deploy globally to all outlook clients the same Categories (custom color & labels) so that when users are editing public calendars they can quickly determine what the appointment pertains to.  Our public calendars are very large and at a month glance could have 100's of entries.

I am to understand in Outlook 2003 a simple registry hack was possible.  However the registry setting for 07' no longer exist; I have looked in to software packages however we do not want to deploy yet another package to these machines and maintain the package.

I am assuming I am going to have to write an add-in, or some kind of .net program to hit a network share and pull the categories into each users calendar.

My question is, has anyone else done this or know of any way to get this accomplished?  Would powershell be a viable solution to something like this?  I am really in a world I do not understand when it comes to customizing the MS Office Suite.  I have no problem writing C#; although most of my exp with programming is in obj-c and python.

Thank you in advance
0
Comment
Question by:bcpa
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24302679
Hi, bcpa.

"I am assuming I am going to have to write an add-in, or some kind of .net program to hit a network share and pull the categories into each users calendar."
Your assumption is correct.  An add-in would be best, but you could do it with an external program.

"Would powershell be a viable solution to something like this? "
I don't know enough about PowerShell to be able to answer the question.  You could do it with VBScript, so it might be possible with PowerShell.  

"My question is, has anyone else done this or know of any way to get this accomplished?"
The answer to both questions is "yes".  I can demonstrate how to do this using VBScript, VBA, and possibly VB.net.  I don't know C#, objc, or Python, so I can't provide any examples in those languages.  If you can read VB, then you can probably translate the solution into C#.  I can't say that for certain though since I don't do C#.  

There have been a couple of questions lately about using standard categories.  I've been thinking about developing a solution that uses a web service like approach.  This would require putting a page on a web server that returned an XML document listing the categories, their names and colors.  The client piece would poll the web service at a set interval, download the XML, and ensure that the local machine has matching categories.  A simpler approach would be to add some VBScript to a login script that'd update the categories each time the user logged in.  The downside I see to that is that an employee could change them immediately after each login.  With the service approach checking say once an hour I doubt a user would want to change categories 8 times a day.  

Let me know what you think.  I can demo a scripted approach in very short order.  A service approach will take a few days for me to put together.
0
 

Author Comment

by:bcpa
ID: 24306666
Running a web service from a local server had not even crossed my mind.  That sounds like a good approach, does Office 2007 have the capability to read the file as an XML file versus a flat text file?

We generally try to avoid login scripts, we use Desktop Authority for a majority of our desktop customization at login.  However if you have a solution in VBScript I would like to see it and see if I can't build off that as an example.  Although I do not personally use VB I am sure I could translate it quite easily, I would post the translation up in C#.  My reasoning for use of C# is only due to my lack of knowledge with VB.

I would be interested to see what you come up with in regards to the web service, in terms of the .net service I will toy with some ideas; however I have very limited knowledge in regards to  the interfacing needed to communicate with Office 2007... I will have to do some research.

Thank you for your reply and I am interested in finding out what we can come up with, this is an issue that should have been addressed by MS.  I did notice there is a GPO for adding custom labels however I have not been able to get it to work; also there is no way to define colors which plays a key role in this particular situation for us.

0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24321371
"Office 2007 have the capability to read the file as an XML file versus a flat text file"
Sure.  Just requires a little scripting.  

"My reasoning for use of C# is only due to my lack of knowledge with VB."
Which is exactly the reason I can't post a solution in C#.

Here's my VBScript solution.  This compares a list of categories and colors to the user's list of categories and colors.  If a category doesn't exist the script creates it.  If the category does exist but doesn't have the right color, then the script resets the color.  
Const CATNAMES = "CatA,Business"
Const CATCOLORS = "2,3"
Dim olkApp, olkSes, olkCats, olkCat, arrCats, varCat, arrColors, varColor, intIndex
Set olkApp = CreateObject("Outlook.Application")
Set olkSes = olkApp.GetNamespace("MAPI")
olkSes.Logon "Outlook"
Set olkCats = olkSes.Categories
arrCats = Split(CATNAMES, ",")
arrColors = Split(CATCOLORS, ",")
For intIndex = LBound(arrCats) To UBound(arrCats)
    varCat = arrCats(intIndex)
    varColor = arrColors(intIndex)
    Set olkCat = olkCats.Item(varCat)
    If TypeName(olkCat) = "Nothing" Then
        Set olkCat = olkCats.Add(varCat, varColor)
    Else
        If olkCat.Color <> varColor Then
            olkCat.Color = varColor
        End If
    End If
Next
Set olkCat = Nothing
Set olkCats = Nothing
olkSes.Logoff
Set olkSes = Nothing
Set olkApp = Nothing

Open in new window

0
 

Author Comment

by:bcpa
ID: 24325766
I will work off this thank you for your help; if you decide to come up with a web service based solution I would be interested in seeing your results.

Thanks much
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24325812
You're welcome.  Glad I could help.  I will put the web service idea together as soon as I can and will post it here or let you know where to find it when it's done.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

840 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