Solved

outlook appointment color

Posted on 2007-03-21
3
662 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

829 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