appointment colours

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
 
J

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
 
M

Michael Bauer

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.
 
J

Jaez

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
 
M

Michael Bauer

Am Sun, 21 May 2006 12:07:37 GMT schrieb Jaez:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top