Solved

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

Posted on 2009-05-04
5
521 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
[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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Changing a few Outlook Options can help keep you organized!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

751 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