appointment colours

  • Thread starter Thread starter Jaez
  • Start date Start date
J

Jaez

I can write fairly simple code in VB6 and have used VBA for MS Word but
have never used VBA in outlook

At work we have to code appointments in calendar by workplan codes by
setting the background colours provided in label.

What I need to do is make a macro that searches all the appointments and
counts those that have a given background colour

Any ideas welcome

Jaez
 
Thanks Michael
I created a new form in Outlook calendar and added a button
pasted the code from the site you suggested and linked the button to

I then get the error in the function on the line marked ***** Compile
error -User defined type not defined

Function GetCalendarLabels(objFolder As Outlook.MAPIFolder) As String
' returns labels as semicolon-delimited string
***** Dim cdoSession As MAPI.Session
Dim cdoFolder As MAPI.Folder
Dim cdoField As MAPI.Field
Dim strLabels As String
Dim strLabelName As String


Any ideas

If this works it would seem to list the labels that the user has entered

What I need is to be able to find the label associated with an appointment

objAppt.Subject gives me the subject and objAppt.start gives me the start
time

but nowhere can I find the equivalent of objAppt.label

Even exporting the Calendar into outlook does not seem to export the labels

Jaez
 
Am Sat, 20 May 2006 16:25:28 GMT schrieb Jaez:

Then you need to add a ref onto that library to your project via
Tools/References.
 
Looking again I see I added wrong one cdo ref

What I need now is to be able to find the label associated with an
appointment - any ideas - objAppt.Subject gives me the subject and
objAppt.start gives me the start time but nowhere can I find the equivalent
of objAppt.label
Jaez
 
Am Sun, 21 May 2006 12:07:37 GMT schrieb Jaez:

Please follow the second comment from Sue under the mentioned sample.
 
Back
Top