Solved

outlook appointment color

Posted on 2007-03-21
3
655 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Several part series to implement Internet Explorer 11 Enterprise Mode
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now