StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
 
Samples
General
Outlook®
 
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Visitors1767992
Impressions6630203
Links
Imprint
Privacy Policy
Contact
Calendar: Color label for an appointment
Author: Michael BauerHomepage
Date: 02.05.2007Accessed: 26083
  
Description

Since Outlook XP appointments can be labeled - but not via the Outlook object model. The sample shows how to use the Redemption for that.

You cannot choose colors of your own. Instead, values from 0 (no label) to 10 (telephon call) are possible, and Outlook then assigns the determined color itself.

Private Sub LabelAppointment(Appt As Outlook.AppointmentItem, _
  Color As Long _
)
  Dim Session As Redemption.RDOSession
  Dim rdAppt As Redemption.RDOAppointmentItem
  Dim EntryID As String
  Dim StoreID As String
  Dim ID As Variant
  Const PropSetID1 = "{00062002-0000-0000-C000-000000000046}"
  Const PR_APPT_COLORS = &H8214

  If Len(Appt.EntryID) = 0 Then
    Exit Sub
  End If

  Set Session = CreateObject("Redemption.RDOSession")
  Session.LogOn

  With Appt
    EntryID = .EntryID
    StoreID = .Parent.StoreID
  End With

  Set rdAppt = Session.GetMessageFromID(EntryID, StoreID)

  ID = rdAppt.GetIDsFromNames(PropSetID1, PR_APPT_COLORS)
  ID = ID Or &H3

  rdAppt.Fields(ID) = Color
  rdAppt.Save

  Session.Logoff
End Sub
 
 

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]

 

Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]

 

SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]

 

OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]