Solved

outlook appointment color

Posted on 2007-03-21
3
663 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
[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
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

749 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