99% of the appointments on my calendar say "Updated: <original appointment name>". I don't find this particularly useful, especially when I look at my calendar on a small screen like the Treo 650, or even smaller Windows Mobile Device. Half the time I have no idea what was Updated anyway, and I just blindly accept the meeting request.
In fact, most meetings go like this:
- You get a Meeting Request for a meeting
- 2 min later you get another meeting request because the person:
- Forgot to make it recurring
- Could not get the conference room
- Added some attendees
- Moved it to a new time because person foo could not make it
- Some time later, due to issues with step 2 you get another appointment.
If you are lucky enough to get to Step 3, you will often find that Outlook will display a message that says "Object moved" when you try and delete, accept or do anything with the third meeting request. I have no idea why.
Anyway, to make the calendar more useful, i wrote a little command line app that will simply remove "Updated: " and "FW: " from the beginning of any appointments on your calendar.
You can download it here, or in the RSS enclosure.
Usual disclaimer applies. This works on my machine, did not do bad, and I am not responsible for what it does on your machine. You must have the Outlook .NET Programability Installed for Outlook 2003.
The code looks like this:
static void Main()
{
string[] prefixes = new string[] {"Updated: ", "FW: "};
try
{
Application application = new Application();
MAPIFolder calendar = application.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
int counter = 0;
foreach (object o in calendar.Items)
{
if (o is AppointmentItem)
{
AppointmentItem appointmentItem = (AppointmentItem)o;
foreach (string s in prefixes)
{
if (appointmentItem.Subject.ToLower().StartsWith(s.ToLower()))
{
string currentSubject = appointmentItem.Subject;
string cleanSubject = currentSubject.Remove(0, s.Length);
appointmentItem.Subject = cleanSubject;
appointmentItem.Save();
Console.WriteLine("subject: {0}", currentSubject);
Console.WriteLine(" new subject: {0}", cleanSubject);
counter++;
}
}
}
}
Console.WriteLine("Cleaned {0} of {1} Appointments", counter, calendar.Items.Count);
Console.WriteLine("Press any key to exit.");
Console.ReadLine();
}
catch (System.Exception ex)
{
Console.WriteLine(ex.Message);
}
}