Outlook Appointment details

  • I have been using the slightly ammended code below which I found online. A problem with this is that the end dates are a day out.

    Reason being, all day events end at midnight. The time 00.00 registers as the next day. So thats the issue im looking to resolve at the moment.

    As a way for me to improve my understanding, what are: .subject .end .start .categories? What would I call these? So I can better search/understand my problem. A list of all these "properties?" would be greatbut I can't find any online.

    Thank you.

  • Hi Andy,

    if the events ends at midnight i.e. next day, you cannot change the date to today as it will not be correct, however if you still want to make the date as same day , simply replace the end time with 11:59 PM so that it ends the same day.

    Also the below code is collecting the events from the calendar, loading it into array and then pasting it into excel file.

     For Each olApt In olfolder.items
     myArr(0, NextRow) = olApt.Subject ' copying subject
     myArr(1, NextRow) = olApt.Start  'copying start date / time
     myArr(2, NextRow) = replace(olApt.End,"00:00","11:59") ' replacing end time from 00:00 to 11:59
     myArr(3, NextRow) = olApt.Categories
     NextRow = NextRow + 1
     On Error GoTo 0
     'Write all records to a worksheet from an array, this is much faster
     ws.Range("A2:D" & NextRow + 1).Value = WorksheetFunction.Transpose(myArr) ' pasting in excel sheet

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!