Outlook statistics

Hello

I have been asked if it is possible to draw up statistics in Outlook. Here is the question:

The user has given colours to the specific rendezvous in the calendar. They would like to have at the end of the month the total amount of hours for each type of rendez-vous (coloured) in the calendar.

Does someone have a script for this or know where I can find one.

Thanks

James
jqurashiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David LeeCommented:
Hi, James.

Do you want a printed report on a per person basis or would you like to collect the information fro all staff and produce an aggregate report?  If the latter, do you have Microsoft Access available or another database system available?
0
jqurashiAuthor Commented:
Hello BlueDevil

Thanks for the reply, the object would be a report per person. Now it wouldn't involve more than 2-3 people.
I have MS Access available. I was checking on the forums about scripting butu I am a real novice in this domaine and it would take me forever just to start to comprenhend how it all works. And if it is only for a handful of users well it is really time consuming!

Cheerio
0
David LeeCommented:
What version of Outlook do the people have who'd be running this?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jqurashiAuthor Commented:
They have Outlook 2003
0
David LeeCommented:
James,

Here's a quick and simple version to demonstrate the capability.  Follow these instructions to set up and use this.

Now, add the macro below by following these instructions.

1.  Start Outlook.
2.  Click Tools > Macro > Visual Basic Editor.
3.  If not already expanded, expand Modules and click on Module1.
4.  Copy the code below and paste it into the right-hand pane of the VB Editor.
5.  Click the diskette icon on the toolbar to save the changes.
6.  Close the VB Editor.
7.  Click Tools > Macro > Security.
8.  Change the Security Level setting to Medium.
9.  Run the macro (Tools > Macro > Macros).

Here's how this works.  The macro begins by prompting the user for the month and year they want to report on.  It then finds all appointments on the default calendar that begin in within that month and loops through them adding up the appointment time based on each appointment's label.  Next, it writes the results to an HTML file and finishes up by displaying that file in Internet Explorer.  The code does use the CDO libraries which should have been installed by default when Outlook 2003 was installed.  If the CDO libraries are missing, then the code will fail.  Outlook doesn't expose the label information directly in 2003.  That's why we have to have CDO.  

I wrote and tested this on a computer running Windows XP SP2 and Outlook 2003 SP2.  It worked perfectly.  
Dim objCDO As Object, _
    objMsg As Object, _
    colFields As Object, _
    objField As Object
    
Sub SummarizeAppointments()
    Const SCRIPT_NAME = "Appointment Summary Report"
    Const LABEL_VALUES = "None,Important,Business,Personal,Vacation,Must Attend,Travel Required,Needs Preparation,Birthday,Anniversary,Phone Call"
    Dim olkItems As Outlook.Items, _
        olkAppt As Outlook.AppointmentItem, _
        arrDate As Variant, _
        datStart As Date, _
        datEnd As Date, _
        intIndex As Integer, _
        intTotal As Long, _
        arrCounts(10) As Long, _
        arrLabels As Variant, _
        objFSO As Object, _
        objFile As Object, _
        objIE As Object
    arrDate = Split(InputBox("Enter the month/year to report on in the form mm/yyyy.", SCRIPT_NAME, Month(Date) & "/" & Year(Date)), "/")
    If IsNumeric(arrDate(0)) And IsNumeric(arrDate(1)) Then
        datStart = arrDate(0) & "/01/" & arrDate(1)
        datEnd = DateAdd("m", 1, datStart)
        datEnd = datEnd - Day(datEnd)
        Set objCDO = CreateObject("MAPI.Session")
        objCDO.Logon "", "", False, False
        Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items.Restrict("[Start] >= """ & datStart & """ AND [Start] <= """ & datEnd & """")
        For Each olkAppt In olkItems
            intIndex = GetApptColorLabel(olkAppt)
            arrCounts(intIndex) = arrCounts(intIndex) + olkAppt.Duration
            intTotal = intotal + arrCounts(intIndex)
        Next
        arrLabels = Split(LABEL_VALUES, ",")
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.CreateTextFile("C:\eeTesting\" & SCRIPT_NAME & ".html")
        objFile.WriteLine "<p>Report for: " & Session.CurrentUser & "<br />Timeframe: " & datStart & " to " & datEnd & "</p>"
        objFile.WriteLine "<table>"
        objFile.WriteLine "  <tr><td>Appt Type</td><td>Time (hours)</td><td>Pct of Total</td></tr>"
        For intIndex = LBound(arrCounts) To UBound(arrCounts)
            objFile.WriteLine "  <tr><td>" & arrLabels(intIndex) & "</td><td align=""right"">" & Format(arrCounts(intIndex) / 60, "#,##0.00") & "</td><td align=""right"">" & Format((arrCounts(intIndex) / intTotal) * 100, "##0.00") & "%" & "</td></tr>"
        Next
        objFile.WriteLine "  <tr><td><b>TOTAL</b></td><td align=""right"">" & Format(intTotal / 60, "#,##0.00") & "</td><td align=""right"">100.00%</td>"
        objFile.WriteLine "</table>"
        objFile.Close
        Set objIE = CreateObject("InternetExplorer.Application")
        objIE.Navigate2 "C:\eeTesting\" & SCRIPT_NAME & ".html"
        Do Until objIE.readyState = 4
            DoEvents
        Loop
        objIE.Visible = True
        objCDO.Logoff
    Else
        MsgBox "The month/year entered is invalid.", vbCritical + vbOKOnly, SCRIPT_NAME
    End If
    Set objMsg = Nothing
    Set colFields = Nothing
    Set objField = Nothing
    Set objCDO = Nothing
    Set objFile = Nothing
    Set objFSO = Nothing
    Set olkAppt = Nothing
    Set olkItems = Nothing
    Set objIE = Nothing
End Sub
 
Function GetApptColorLabel(olkAppt As Outlook.AppointmentItem) As Integer
    ' adapted from sample code by Randy Byrne
    ' intColor corresponds to the ordinal value of the color label
    ' 1=Important, 2=Business, etc.
    Const CdoPropSetID1 = "0220060000000000C000000000000046"
    Const CdoAppt_Colors = "0x8214"
    On Error Resume Next
    If Not olkAppt.EntryID = "" Then
        Set objMsg = objCDO.GetMessage(olkAppt.EntryID, olkAppt.Parent.StoreID)
        Set colFields = objMsg.Fields
        Set objField = colFields.Item(CdoAppt_Colors, CdoPropSetID1)
        If Not objField Is Nothing Then
            GetApptColorLabel = objField.Value
        End If
    End If
End Function

Open in new window

0
jqurashiAuthor Commented:
WOW......thanks, unfortunately I may not be able to test this tomorrow but on Monday I will have a go. I will let you know. Small question, how long did it take you to write this code!?! Crumbs, seems eye boggling to me!

Cheerio

James
0
David LeeCommented:
James,

No problem on how long it takes to test this.  It probably took 30 - 60 minutes to write/test this.  I canabalized a good bit of the code from other things I've written, so it took less time than if I'd had to do it all from scratch.  Tested it a few times and added a couple of things just to make it look nicer.  
0
jqurashiAuthor Commented:
Hello BluedevilFan

I just copied the code then ran it and I have and error '76'

Would this be cause of the exchange server?

thanks a lot

James


untitled.JPG
untitled2.JPG
0
David LeeCommented:
Change the path specified on that line.  Sorry, I should have put a comment in the code so you'd have known to do that.  The path can be to any folder on your computer.
0
jqurashiAuthor Commented:
Hello BlueDevilFan

Ok , I had to modify another line, at least I managed ot understand the debugger, quite useful when it tells you where the problem is! Anyway it churns out a simple but great html sheet of data!

Now all I have to do is rename the titles which the user gave to the categories, I can do this directly in the VB code no?
0
David LeeCommented:
Yes, you can edit the titles as needed.  They're on line #8 of the code.  There should be 11 of them.  You can also add formatting to the HTML to make the report look nicer.
0
jqurashiAuthor Commented:
Hello BlueDevilFan

I have been away the last 2 days. Right I made the adjustments and the program runs smoothly! I was overjoyed, however there is something that bothers me and I do not understand. The 2 printscreens here show you the users calendar for January and the report

There are 4 different types of labels in the calendar

In the second printscreen you will see that only 2 labels have been listed?!?!? The time doesn't seem to register. There are no bugs when launching the program that is what I cannot fathom.

Many thanks

James
untitled.JPG
Appointment-Summary-Report.txt
0
David LeeCommented:
Hi, James.

We'll need to run a test to find out what's going on.  Here's what I need you to do.

1.  Replace line #32 of the code I posted with this:
     intTotal = intotal + arrCounts(intIndex)

2.  Insert this line of code immediately after line #30 of the code I posted.
     Debug.Print "Label: " & intIndex & vbTab & "Duration: " & olkAppt.Duration

3.  While still in the VB editor run the macro.  

4.  When the macro is finished, look in the "Immediate" pane.  You should see a bunch of lines that look like this:

    Label: x    Duration: y

I need you to copy all of those lines and post them here.
0
jqurashiAuthor Commented:
Hi BDF

Thanks for all this, you are a star!

Label: 0    Duration: 30
Label: 0    Duration: 90
Label: 0    Duration: 150
Label: 0    Duration: 120
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 30
Label: 0    Duration: 120
Label: 0    Duration: 210
Label: 0    Duration: 210
Label: 0    Duration: 450
Label: 0    Duration: 150
Label: 0    Duration: 120
Label: 0    Duration: 30
Label: 0    Duration: 60
Label: 0    Duration: 180
Label: 0    Duration: 90
Label: 0    Duration: 30
Label: 0    Duration: 60
Label: 4    Duration: 60
Label: 0    Duration: 90
Label: 0    Duration: 30
Label: 0    Duration: 120
Label: 0    Duration: 90
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 120
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 330
Label: 0    Duration: 210
Label: 0    Duration: 210
Label: 0    Duration: 150
Label: 0    Duration: 90
Label: 0    Duration: 210
Label: 0    Duration: 75
Label: 0    Duration: 30
Label: 0    Duration: 60
Label: 0    Duration: 30
Label: 0    Duration: 1440
Label: 0    Duration: 60
Label: 0    Duration: 120
Label: 0    Duration: 90
Label: 0    Duration: 150
Label: 0    Duration: 150
Label: 0    Duration: 120
Label: 0    Duration: 180
Label: 5    Duration: 120
Label: 0    Duration: 60
Label: 0    Duration: 60
Label: 0    Duration: 270
Label: 0    Duration: 270
Label: 0    Duration: 1440
Label: 0    Duration: 1440
0
jqurashiAuthor Commented:
By the way, your instructions are crystal clear, very helpful for me as I am in unknown territory!

:-)

Cheerio, James
0
David LeeCommented:
Thanks, James!

Hmmm .... all but two of the items are failing to return a label index (the items showing Label: 0).  I'm not sure why that is.  Replace the SummarizeAppointments sub you have with the one below.  Run the macro again and collect/post the output from the Immediate pane.  I've added a couple of more pieces of information to what it'll show to help me figure out what's going on.
Sub SummarizeAppointments()
    Const SCRIPT_NAME = "Appointment Summary Report"
    Const LABEL_VALUES = "None,Important,Business,Personal,Vacation,Must Attend,Travel Required,Needs Preparation,Birthday,Anniversary,Phone Call"
    Dim olkItems As Outlook.Items, _
        olkAppt As Outlook.AppointmentItem, _
        arrDate As Variant, _
        datStart As Date, _
        datEnd As Date, _
        intIndex As Integer, _
        intTotal As Long, _
        arrCounts(10) As Long, _
        arrLabels As Variant, _
        objFSO As Object, _
        objFile As Object, _
        objIE As Object
    arrDate = Split(InputBox("Enter the month/year to report on in the form mm/yyyy.", SCRIPT_NAME, Month(Date) & "/" & Year(Date)), "/")
    If IsNumeric(arrDate(0)) And IsNumeric(arrDate(1)) Then
        datStart = arrDate(0) & "/01/" & arrDate(1)
        datEnd = DateAdd("m", 1, datStart)
        datEnd = datEnd - Day(datEnd)
        Set objCDO = CreateObject("MAPI.Session")
        objCDO.Logon "", "", False, False
        Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items.Restrict("[Start] >= """ & datStart & """ AND [Start] <= """ & datEnd & """")
        For Each olkAppt In olkItems
            intIndex = GetApptColorLabel(olkAppt)
            Debug.Print "Label: " & intIndex & vbTab & "Duration: " & olkAppt.Duration & vbTab & "Class: " & olkAppt.Class & vbTab & "Subject: " & olkAppt.Subject
            arrCounts(intIndex) = arrCounts(intIndex) + olkAppt.Duration
            intTotal = intTotal + olkAppt.Duration
        Next
        arrLabels = Split(LABEL_VALUES, ",")
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.CreateTextFile("C:\eeTesting\" & SCRIPT_NAME & ".html")
        objFile.WriteLine "<p>Report for: " & Session.CurrentUser & "<br />Timeframe: " & datStart & " to " & datEnd & "</p>"
        objFile.WriteLine "<table>"
        objFile.WriteLine "  <tr><td>Appt Type</td><td>Time (hours)</td><td>Pct of Total</td></tr>"
        For intIndex = LBound(arrCounts) To UBound(arrCounts)
            objFile.WriteLine "  <tr><td>" & arrLabels(intIndex) & "</td><td align=""right"">" & Format(arrCounts(intIndex) / 60, "#,##0.00") & "</td><td align=""right"">" & Format((arrCounts(intIndex) / intTotal) * 100, "##0.00") & "%" & "</td></tr>"
        Next
        objFile.WriteLine "  <tr><td><b>TOTAL</b></td><td align=""right"">" & Format(intTotal / 60, "#,##0.00") & "</td><td align=""right"">100.00%</td>"
        objFile.WriteLine "</table>"
        objFile.Close
        Set objIE = CreateObject("InternetExplorer.Application")
        objIE.Navigate2 "C:\eeTesting\" & SCRIPT_NAME & ".html"
        Do Until objIE.readyState = 4
            DoEvents
        Loop
        objIE.Visible = True
        objCDO.Logoff
    Else
        MsgBox "The month/year entered is invalid.", vbCritical + vbOKOnly, SCRIPT_NAME
    End If
    Set objMsg = Nothing
    Set colFields = Nothing
    Set objField = Nothing
    Set objCDO = Nothing
    Set objFile = Nothing
    Set objFSO = Nothing
    Set olkAppt = Nothing
    Set olkItems = Nothing
    Set objIE = Nothing
End Sub

Open in new window

0
jqurashiAuthor Commented:
Hello BDF

Right, inserted the code and had an error message regarding the GetApptColorLabel. So I looked up the help on VB and also asked around here and found someone who does a bit of coding. Now he added a few lines from the internet, I will post them, then we launched the macro adn a lot mor data came through. But strangely enough the same 2 labels are only listed.
Dim objCDO As Object, _
    objMsg As Object, _
    colFields As Object, _
    objField As Object
    
Sub SummarizeAppointments()
    Const SCRIPT_NAME = "Appointment Summary Report"
    Const LABEL_VALUES = "None,Important,Business,Personal,Vacation,Must Attend,Travel Required,Needs Preparation,Birthday,Anniversary,Phone Call"
    Dim olkItems As Outlook.Items, _
        olkAppt As Outlook.AppointmentItem, _
        arrDate As Variant, _
        datStart As Date, _
        datEnd As Date, _
        intIndex As Integer, _
        intTotal As Long, _
        arrCounts(10) As Long, _
        arrLabels As Variant, _
        objFSO As Object, _
        objFile As Object, _
        objIE As Object
    arrDate = Split(InputBox("Enter the month/year to report on in the form mm/yyyy.", SCRIPT_NAME, Month(Date) & "/" & Year(Date)), "/")
    If IsNumeric(arrDate(0)) And IsNumeric(arrDate(1)) Then
        datStart = arrDate(0) & "/01/" & arrDate(1)
        datEnd = DateAdd("m", 1, datStart)
        datEnd = datEnd - Day(datEnd)
        Set objCDO = CreateObject("MAPI.Session")
        objCDO.Logon "", "", False, False
        Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items.Restrict("[Start] >= """ & datStart & """ AND [Start] <= """ & datEnd & """")
        For Each olkAppt In olkItems
            intIndex = GetApptColorLabel(olkAppt)
            Debug.Print "Label: " & intIndex & vbTab & "Duration: " & olkAppt.Duration & vbTab & "Class: " & olkAppt.Class & vbTab & "Subject: " & olkAppt.Subject
            arrCounts(intIndex) = arrCounts(intIndex) + olkAppt.Duration
            intTotal = intTotal + olkAppt.Duration
        Next
        arrLabels = Split(LABEL_VALUES, ",")
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.CreateTextFile("C:\Data\" & SCRIPT_NAME & ".html")
        objFile.WriteLine "<p>Report for: " & Session.CurrentUser & "<br />Timeframe: " & datStart & " to " & datEnd & "</p>"
        objFile.WriteLine "<table>"
        objFile.WriteLine "  <tr><td>Appt Type</td><td>Time (hours)</td><td>Pct of Total</td></tr>"
        For intIndex = LBound(arrCounts) To UBound(arrCounts)
            objFile.WriteLine "  <tr><td>" & arrLabels(intIndex) & "</td><td align=""right"">" & Format(arrCounts(intIndex) / 60, "#,##0.00") & "</td><td align=""right"">" & Format((arrCounts(intIndex) / intTotal) * 100, "##0.00") & "%" & "</td></tr>"
        Next
        objFile.WriteLine "  <tr><td><b>TOTAL</b></td><td align=""right"">" & Format(intTotal / 60, "#,##0.00") & "</td><td align=""right"">100.00%</td>"
        objFile.WriteLine "</table>"
        objFile.Close
        Set objIE = CreateObject("InternetExplorer.Application")
        objIE.Navigate2 "C:\Data\" & SCRIPT_NAME & ".html"
        Do Until objIE.readyState = 4
            DoEvents
        Loop
        objIE.Visible = True
        objCDO.Logoff
    Else
        MsgBox "The month/year entered is invalid.", vbCritical + vbOKOnly, SCRIPT_NAME
    End If
    Set objMsg = Nothing
    Set colFields = Nothing
    Set objField = Nothing
    Set objCDO = Nothing
    Set objFile = Nothing
    Set objFSO = Nothing
    Set olkAppt = Nothing
    Set olkItems = Nothing
    Set objIE = Nothing
End Sub
 
Function GetApptColorLabel(objAppt As Outlook.AppointmentItem) As Integer
On Error Resume Next
' Requires reference to CDO 1.21 Library
' Adapted from sample code by Randy Byrne posted on www.OutlookCode.com
' link: http://www.outlookcode.com/codedetail.aspx?id=139
 
' intColor corresponds to the ordinal value of the color label
'1=Important, 2=Business, etc.
Const CdoPropSetID1 = "0220060000000000C000000000000046"
Const CdoAppt_Colors = "0x8214"
Dim objCDO As Object 'As MAPI.Session
Dim objField As Object 'As MAPI.Field
Set objCDO = CreateObject("MAPI.Session")
Set objField = CreateObject("MAPI.Field")
' Create implicit CDO object
With CreateObject("MAPI.Session")
.Logon "", "", False, False
If Len(Trim$(objAppt.EntryID)) > 0 Then
With .GetMessage(objAppt.EntryID, objAppt.Parent.StoreID)
Set objField = .Fields.Item(CdoAppt_Colors, CdoPropSetID1)
If objField Is Nothing Then
Err.Clear
MsgBox "Error processing appt " & objAppt.Subject, vbCritical, "Appt Label Error"
GetApptColorLabel = 0
Else
GetApptColorLabel = objField.Value
End If
End With
End If
.Logoff
End With
Set objField = Nothing
On Error GoTo 0
End Function 'GetApptColorLabel

Open in new window

0
jqurashiAuthor Commented:
Now when I run the code this is the data that I get:

Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 60    Class: 26   Subject: commandes
Label: 0    Duration: 60    Class: 26   Subject: Lunch Raphael
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: Suivi de réunion
Label: 0    Duration: 120   Class: 26   Subject: factures
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: Validation cale 3154
Label: 0    Duration: 30    Class: 26   Subject: Amélioration procédure acte d'achat
Label: 0    Duration: 120   Class: 26   Subject: Commandes, ajustement poids sku, mails
Label: 0    Duration: 90    Class: 26   Subject: Commandes
Label: 0    Duration: 60    Class: 26   Subject: facture
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:30
Label: 0    Duration: 60    Class: 26   Subject: Photocopie des commandes
Label: 0    Duration: 50    Class: 26   Subject: Admin / cdes, copies
Label: 0    Duration: 30    Class: 26   Subject: 5039 / biscuits  /crèmes / Gobelets cartons
Label: 0    Duration: 30    Class: 26   Subject: 1:00 / TL 4:15
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 90    Class: 26   Subject: Création SKU
Label: 0    Duration: 150   Class: 26   Subject: SCM - ajustement qty pour budget 2008 Marvinpac
Label: 0    Duration: 120   Class: 26   Subject: facures
Label: 0    Duration: 30    Class: 26   Subject: PDG
Label: 0    Duration: 30    Class: 26   Subject: Transformation Discovery box
Label: 0    Duration: 60    Class: 26   Subject: processus factures paiements Marvinpac => NNSA
Label: 0    Duration: 60    Class: 26   Subject: PDG
Label: 0    Duration: 60    Class: 26   Subject: Factures
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 30    Class: 26   Subject: -0:15
Label: 0    Duration: 30    Class: 26   Subject: 1:00
Label: 0    Duration: 30    Class: 26   Subject: 2:45 / TL 3:15
Label: 0    Duration: 30    Class: 26   Subject: 1:00
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 1:45
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:45
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 30    Class: 26   Subject: 0:30
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 120   Class: 26   Subject: Analyser mon temps
Label: 0    Duration: 210   Class: 26   Subject: Commandes
Label: 0    Duration: 210   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 450   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 150   Class: 26   Subject: Café, transfert, maquant, inversion !!
Label: 0    Duration: 120   Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: 3181 - qty starting kit, donc levier de négo +important pour le 3181
Label: 0    Duration: 60    Class: 26   Subject: 5708 - Module de rangement
Label: 0    Duration: 180   Class: 26   Subject: Tableau QTY cdée Vs OP
Label: 0    Duration: 90    Class: 26   Subject: Lunch Roberto
Label: 0    Duration: 30    Class: 26   Subject: Tél de Virigina Amaretti
Label: 0    Duration: 60    Class: 26   Subject: Commandes 2008 marvnipac avec mes initiales !!
Label: 4    Duration: 60    Class: 26   Subject: factures
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: T.A
Label: 0    Duration: 120   Class: 26   Subject: Updated: Revue de performance
Label: 0    Duration: 90    Class: 26   Subject: Tableau prix 2008
Label: 0    Duration: 60    Class: 26   Subject: Retour de Broc
Label: 0    Duration: 60    Class: 26   Subject: Trajet à Broc
Label: 0    Duration: 60    Class: 26   Subject: Tableau prix/qty 2007
Label: 0    Duration: 120   Class: 26   Subject: Mis(e) à jour: Nespresso Reward pack 2008 - Kick-off Meeting
Label: 0    Duration: 60    Class: 26   Subject: MKL - napkins + boite 5capsules Pro
Label: 0    Duration: 60    Class: 26   Subject: Linda - SCM
Label: 0    Duration: 330   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 210   Class: 26   Subject: Cdes 2008
Label: 0    Duration: 210   Class: 26   Subject: Tableau prix / qty 2007
Label: 0    Duration: 150   Class: 26   Subject: LUNCH Filles
Label: 0    Duration: 90    Class: 26   Subject: Lunch benjamin
Label: 0    Duration: 210   Class: 26   Subject: ASAA
Label: 0    Duration: 75    Class: 26   Subject: Lunch Benoit
Label: 0    Duration: 30    Class: 26   Subject: Organisation Factures
Label: 0    Duration: 60    Class: 26   Subject: Décision Finale Chocolat Reward 2008
Label: 0    Duration: 30    Class: 26   Subject: Sophie Ducroq
Label: 0    Duration: 1440  Class: 26   Subject: Fabienne Chatelan B.Day
Label: 0    Duration: 60    Class: 26   Subject: Designer Zaccheo
Label: 0    Duration: 120   Class: 26   Subject: Lunch
Label: 0    Duration: 90    Class: 26   Subject: Osthéopathe
Label: 0    Duration: 150   Class: 26   Subject: Crème Export avec M. Ruch, Cremo
Label: 0    Duration: 150   Class: 26   Subject: Quality, Ludovica's today email
Label: 0    Duration: 120   Class: 26   Subject: Lunch Ludovica - Caroline
Label: 0    Duration: 180   Class: 26   Subject: Fournisseurs autre que Marvinpac
Label: 5    Duration: 120   Class: 26   Subject: Updated: Accessories' Review Meeting
Label: 0    Duration: 60    Class: 26   Subject: dr kovaliv
Label: 0    Duration: 60    Class: 26   Subject: Préparer procédure café Marvinpac => Orbe
Label: 0    Duration: 270   Class: 26   Subject: Mise à jour tableau évolution des prix
Label: 0    Duration: 270   Class: 26   Subject: Mise à jour tableau évolution des prix
Label: 0    Duration: 1440  Class: 26   Subject: ASAA - Gestion des processus d'achat
Label: 0    Duration: 1440  Class: 26   Subject: ASAA - Gestion des processus d'achat
Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 60    Class: 26   Subject: commandes
Label: 0    Duration: 60    Class: 26   Subject: Lunch Raphael
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: Suivi de réunion
Label: 0    Duration: 120   Class: 26   Subject: factures
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: Validation cale 3154
Label: 0    Duration: 30    Class: 26   Subject: Amélioration procédure acte d'achat
Label: 0    Duration: 120   Class: 26   Subject: Commandes, ajustement poids sku, mails
Label: 0    Duration: 90    Class: 26   Subject: Commandes
Label: 0    Duration: 60    Class: 26   Subject: facture
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:30
Label: 0    Duration: 60    Class: 26   Subject: Photocopie des commandes
Label: 0    Duration: 50    Class: 26   Subject: Admin / cdes, copies
Label: 0    Duration: 30    Class: 26   Subject: 5039 / biscuits  /crèmes / Gobelets cartons
Label: 0    Duration: 30    Class: 26   Subject: 1:00 / TL 4:15
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 90    Class: 26   Subject: Création SKU
Label: 0    Duration: 150   Class: 26   Subject: SCM - ajustement qty pour budget 2008 Marvinpac
Label: 0    Duration: 120   Class: 26   Subject: facures
Label: 0    Duration: 30    Class: 26   Subject: PDG
Label: 0    Duration: 30    Class: 26   Subject: Transformation Discovery box
Label: 0    Duration: 60    Class: 26   Subject: processus factures paiements Marvinpac => NNSA
Label: 0    Duration: 60    Class: 26   Subject: PDG
Label: 0    Duration: 60    Class: 26   Subject: Factures
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 30    Class: 26   Subject: -0:15
Label: 0    Duration: 30    Class: 26   Subject: 1:00
Label: 0    Duration: 30    Class: 26   Subject: 2:45 / TL 3:15
Label: 0    Duration: 30    Class: 26   Subject: 1:00
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 1:45
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:45
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 30    Class: 26   Subject: 0:15
Label: 0    Duration: 30    Class: 26   Subject: 0:30
Label: 0    Duration: 30    Class: 26   Subject: 0
Label: 0    Duration: 120   Class: 26   Subject: Analyser mon temps
Label: 0    Duration: 210   Class: 26   Subject: Commandes
Label: 0    Duration: 210   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 450   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 150   Class: 26   Subject: Café, transfert, maquant, inversion !!
Label: 0    Duration: 120   Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: 3181 - qty starting kit, donc levier de négo +important pour le 3181
Label: 0    Duration: 60    Class: 26   Subject: 5708 - Module de rangement
Label: 0    Duration: 180   Class: 26   Subject: Tableau QTY cdée Vs OP
Label: 0    Duration: 90    Class: 26   Subject: Lunch Roberto
Label: 0    Duration: 30    Class: 26   Subject: Tél de Virigina Amaretti
Label: 0    Duration: 60    Class: 26   Subject: Commandes 2008 marvnipac avec mes initiales !!
Label: 4    Duration: 60    Class: 26   Subject: factures
Label: 0    Duration: 90    Class: 26   Subject: factures
Label: 0    Duration: 30    Class: 26   Subject: T.A
Label: 0    Duration: 120   Class: 26   Subject: Updated: Revue de performance
Label: 0    Duration: 90    Class: 26   Subject: Tableau prix 2008
Label: 0    Duration: 60    Class: 26   Subject: Retour de Broc
Label: 0    Duration: 60    Class: 26   Subject: Trajet à Broc
Label: 0    Duration: 60    Class: 26   Subject: Tableau prix/qty 2007
Label: 0    Duration: 120   Class: 26   Subject: Mis(e) à jour: Nespresso Reward pack 2008 - Kick-off Meeting
Label: 0    Duration: 60    Class: 26   Subject: MKL - napkins + boite 5capsules Pro
Label: 0    Duration: 60    Class: 26   Subject: Linda - SCM
Label: 0    Duration: 330   Class: 26   Subject: Commandes 2008
Label: 0    Duration: 210   Class: 26   Subject: Cdes 2008
Label: 0    Duration: 210   Class: 26   Subject: Tableau prix / qty 2007
Label: 0    Duration: 150   Class: 26   Subject: LUNCH Filles
Label: 0    Duration: 90    Class: 26   Subject: Lunch benjamin
Label: 0    Duration: 210   Class: 26   Subject: ASAA
Label: 0    Duration: 75    Class: 26   Subject: Lunch Benoit
Label: 0    Duration: 30    Class: 26   Subject: Organisation Factures
Label: 0    Duration: 60    Class: 26   Subject: Décision Finale Chocolat Reward 2008
Label: 0    Duration: 30    Class: 26   Subject: Sophie Ducroq
Label: 0    Duration: 1440  Class: 26   Subject: Fabienne Chatelan B.Day
Label: 0    Duration: 60    Class: 26   Subject: Designer Zaccheo
Label: 0    Duration: 120   Class: 26   Subject: Lunch
Label: 0    Duration: 90    Class: 26   Subject: Osthéopathe
Label: 0    Duration: 150   Class: 26   Subject: Crème Export avec M. Ruch, Cremo
Label: 0    Duration: 150   Class: 26   Subject: Quality, Ludovica's today email
Label: 0    Duration: 120   Class: 26   Subject: Lunch Ludovica - Caroline
Label: 0    Duration: 180   Class: 26   Subject: Fournisseurs autre que Marvinpac
Label: 5    Duration: 120   Class: 26   Subject: Updated: Accessories' Review Meeting
Label: 0    Duration: 60    Class: 26   Subject: dr kovaliv
Label: 0    Duration: 60    Class: 26   Subject: Préparer procédure café Marvinpac => Orbe
Label: 0    Duration: 270   Class: 26   Subject: Mise à jour tableau évolution des prix
Label: 0    Duration: 270   Class: 26   Subject: Mise à jour tableau évolution des prix
Label: 0    Duration: 1440  Class: 26   Subject: ASAA - Gestion des processus d'achat
Label: 0    Duration: 1440  Class: 26   Subject: ASAA - Gestion des processus d'achat
0
jqurashiAuthor Commented:
It is really weird, as the result is as follows:

Report for: Qurashi Caroline
Timeframe: 01.01.2008 to 31.01.2008

Appt Type Time (hours) Pct of Total
None 196.58 98.50%
Important 0.00 0.00%
Business 0.00 0.00%
Personal 0.00 0.00%
Vacation 1.00 0.50%
Must Attend 2.00 1.00%
Travel Required 0.00 0.00%
Needs Preparation 0.00 0.00%
Birthday 0.00 0.00%
Anniversary 0.00 0.00%
Phone Call 0.00 0.00%
TOTAL 199.58 100.00%


I have also noted something else, when I select this month, the date for the report does NOT change and the data is EXACTLY the same.

Thank you again for all your help, 500 points is not enough in my book, you have already earned way more than that! :-)

Cheerio

James
0
jqurashiAuthor Commented:
Hello

Any idea on how to continue?

Cheers
0
David LeeCommented:
James,

Apologies for being away for so long.  I don't know what's going on here.  I run the code on both my personal and work systems and it works perfectly.  I can't fathom how the code isn't getting the label.  Since everything works here but not there, I have to assume it has something to do with the appointments.  Would it be possible for you to create a PST file and copy ten or so of the appointments to it, then post the PST file in a location where I can download it?  That'd give me the opportunity to see if I can figure out what's happening.
0
jqurashiAuthor Commented:
Hello BDF

Eh no worries with Easter around the corner I guessed you must have been away. I have been away as well, Easter holidays and what not. It should be a problem to create a pst folder and then copy to a location (ftp server).

Thanks for everything

Cheerio James
0
David LeeCommented:
Hi, James.

Post a link to teh file when it's ready and I'll download and test.
0
jqurashiAuthor Commented:
hmmm.....okay.....I have never done an upload to an ftp server........I will have a look into this, give me a day or two!

thanks
0
David LeeCommented:
No problem.  I'll be here whenever you are ready.
0
jqurashiAuthor Commented:
Hello BluedevilFan

I will not offend you by even trying to apologize for the delay in reply, I have changed my job and I no longer work in the IT environement per say. I am in Internanl Communication and I have been swamped with work!
I thank you so much for your time and effort, I only wish that I could give you more points, I will continue to use Experts Exchange site as it is still useful for my work as other sides of IT (Intranet) will surely be unclear for me! :-)

Thanks again and have a nice day

James
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.