Solved

outlook appointment color

Posted on 2007-03-21
3
658 Views
Last Modified: 2012-08-14
Microsoft Windows 2000  Outlook 2003 VBA or VBScript  - Want to change the appointment color by program automatically when an appointment is added - where can i find the syntax for accessing this part of Outlook
0
Comment
Question by:ston4u
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 18867785
This page at Outlookcode.com (http://www.outlookcode.com/codedetail.aspx?id=139) shows how to set the label color of an appointment.  The colors themselves cannot be changed, i.e. you cannot substitute one color for another or alter the label colors in any way.  As for doing this automatically, that's simple enough.  We just need to trap the event that's fired when an item is added to the calendar.  Something like this:

Private WithEvents olkCalendar As Items

Private Sub Application_Quit()
    Set olkCalendar = Nothing
End Sub

Private Sub Application_Startup()
    Set olkCalendar = Session.GetDefaultFolder(olFolderCalendar).Items
End Sub

Private Sub olkCalendar_ItemAdd(ByVal Item As Object)
    'Code for whatever you want to do when a new item is added goes here
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A few months ago I had an issue with LaserJet 1020 printer which was installed to XP and Windows 7.  It was installed to XP and working, but when I tried to connect from a Windows 7 PC, it would attempt connection and then fail.  Sometimes the Spool…
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now