Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   appointment colours (http://www.outlookbanter.com/outlook-vba/15261-appointment-colours.html)

Jaez May 20th 06 12:20 AM

appointment colours
 
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



Michael Bauer May 20th 06 09:14 AM

appointment colours
 
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


Jaez May 20th 06 06:25 PM

appointment colours
 
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




Michael Bauer May 21st 06 01:36 PM

appointment colours
 
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


Jaez May 21st 06 02:07 PM

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




Michael Bauer May 22nd 06 06:43 AM

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

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

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


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



All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com