Solved

Outlook appointment: way (script?) to change the "Category" field based on the "Show As" field

Posted on 2016-08-26
5
24 Views
Last Modified: 2016-08-31
Hi Experts

I like to use Categories to change the colour of certain Outlook appointments. I usually do this when I create the appointment.

I have a 3rd party app that creates appointments in my calendar. I cannot ask the 3rd party app to set a particular Category - BUT - I can ask it to set the "Show As" field (Free, Tentative, Busy, Out of the Office)

Is there a way to change an Appointment Category after it is created based on its "Show As" value? I assume this needs to be scheduled every xx (15) minutes??

Alex
0
Comment
Question by:Alexandre Michel
[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
  • 4
5 Comments
 
LVL 22

Expert Comment

by:yo_bee
ID: 41771518
Do you want this to change whenever the Show As changes.
So if Tentative it is Yellow, but when it changes to busy be Red or upon creation it is set then and never will change unless human intervention is involved?
0
 
LVL 4

Author Comment

by:Alexandre Michel
ID: 41772591
Yes, I would like indeed to have
Free = Green,
Tentative = Category Yellow
Busy = Category Orange and
Out f the Office = Category Red

The "Show As" is generally changed by the 3rd party app.

I assume that there could be a script that could run every so often and check the "Show As" for  all appointments, then change the "Category" accordingly.
0
 
LVL 4

Author Comment

by:Alexandre Michel
ID: 41772604
I am doing some research and found a script that could be modified
It comes from http://www.slipstick.com/outlook/calendar/automatically-change-appointment-categories-vba/ 

Public Sub AddCategory()
 Dim Appt As Object

  Set Items = Session.GetDefaultFolder(olFolderCalendar).Items
   For Each Appt In Items
    On Error Resume Next

If Appt.End < Now() Then
    With Appt
       .Categories = "Completed"
       .ReminderSet = False
       .Save
    End with
End If
 
Next
 
Set Appt = Nothing

End Sub

Open in new window


I now need to find a way to replace Appt.End < Now() with something that test the value of "Show As"
0
 
LVL 4

Accepted Solution

by:
Alexandre Michel earned 0 total points
ID: 41772610
Update & Resolution:

I found a way to do this without using VBS... Instead, I can use Conditional Formatting
Here are some links explaining the way to do it
https://blogs.msdn.microsoft.com/seliot/2010/02/04/conditional-formatting-of-appointments-in-outlook-2010/
https://www.msoutlook.info/question/811
0
 
LVL 4

Author Closing Comment

by:Alexandre Michel
ID: 41777759
This solves the issue in a much easier way that using a script and it is instantaneous
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

762 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