View Single Post
  #5  
Old May 21st 06, 02:07 PM posted to microsoft.public.outlook.program_vba
Jaez
external usenet poster
 
Posts: 4
Default appointment colours


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





"Michael Bauer" wrote in message
...
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.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


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



"Michael Bauer" wrote in message
...
Am Fri, 19 May 2006 22:20:47 GMT schrieb Jaez:

This sample might give you a starting point:
http://www.outlookcode.com/codedetail.aspx?id=755

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


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



Ads