How can I have all the appointments for one day ?

Discussion in 'Questions (Windows Mobile)' started by Berurier, Nov 9, 2007.

  1. Berurier

    Berurier Member

    Hello,

    I want to get all the appointements for a day specified.

    I tried outlook.finditem("Start",dateparse(myDate) but it have all the appointments of my pocket outlook

    How can i do to have only the appointments of the day ?

    Thank you
     
  2. Rioven

    Rioven Active Member Licensed User

    Hi Berurier,

    This solution will search all appointments and collect only items with date you have specified. you can add 'sortItem' method to shorten the search process.


    Code:
    'load component 'outlook.dll'
       'add object pimcollection called 'pimcol' 
       'and appointment called 'appointment'

       
    'add control 'listbox1'

    Sub Globals
       
    'Declare the global variables here.
    End Sub

    Sub App_Start

       Form1.Show
       PimCol.New1(
    "Appointments")
       Appointment.New1
       
          mydate=
    "11/25/2007"
          
          DateFormat(
    "mm/dd/yyyy")
       
             i = 
    0
          
    Do
                Appointment.Value = PimCol.GetItem(i)     
                i = i + 
    1
             
    If myDate= Date(Appointment.Start)Then
             listbox1.Add(Appointment.subject) 
    'collect to a control listbox1
                End If
             
          
    Loop While i < PimCol.Count

    End Sub

    Regards,
     
    Last edited: Nov 9, 2007
Loading...