Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete recurring appointments (2003)

    When deleting recurring events, Outlook prompts the user if he/she wants to delete the whole series or just the occurrence. if you select, just the occurrence then only that particular event will be deleted else the whole series gets deleted.

    Hope that helps,
    Regards,
    Bikash.

  2. #2
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Delete recurring appointments (2003)

    Thanks. But waht i want to do is if for example I go on vacation for a week (I wish) to remove all appointments for that week or a specific day, without having to do it one by one, but without removing the recurring appointment completely.

  3. #3
    New Lounger
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Delete recurring appointments (2003)

    AS far as I know, there is no way to do it using the Outlook User Interface. Through code, you probably could.

    Hope that helps,
    Regards,
    Bikash.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    VBA to Delete All Recurring appts in span(2003)

    If you have recurring appointments, i.e. classes for the whole school year, and you want to clear all the appointments for a certain day or week, without erasing te whole recurrence. How do you do that?
    thanks

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Delete recurring appointments (2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Based on code found at http://www.outlookcode.com/codedetail.aspx?id=165 I changed the following to delete all recurring appointments in a given span. Any improvements would be greatly appreciated

    Zave
    <pre>Function DateSpan(colItems As Outlook.Items, _
    dteStart As Date, dteEnd As Date) _
    As Outlook.Items
    Dim colSpanItems As Outlook.Items
    On Error Resume Next
    colItems.Sort "[Start]"
    colItems.IncludeRecurrences = True
    strFind = "[Start] <= " & _
    Quote(Format(dteEnd, "ddddd") & " 11:59 PM") & _
    " AND [End] > " & _
    Quote(Format(dteStart, "ddddd") & " 12:00 AM")
    'MsgBox strFind
    Set colSpanItems = colItems.Restrict(strFind)
    If Err = 0 Then
    Set DateSpan = colSpanItems
    End If
    Set colSpanItems = Nothing
    End Function

    Function Quote(MyText)
    Quote = Chr(34) & MyText & Chr(34)
    End Function

    Sub TestDateSpan()
    Dim objOL As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim colCal As Outlook.Items
    Dim objAppt As Outlook.AppointmentItem
    Dim dtStart As Date
    Dim dtEnd As Date
    On Error Resume Next

    dtStart = InputBox("Enter Start Date as date mm/dd/yyyy", "Start date")
    dtStart = "#" & Format(dtStart, "mm/dd/yyyy") & "#"
    dtEnd = InputBox("Enter End Date as date mm/dd/yyyy", "End Date")
    dtEnd = "#" & Format(dtEnd, "mm/dd/yyyy") & "#"

    Set objOL = CreateObject("Outlook.Application")
    Set objNS = objOL.GetNamespace("MAPI")
    Set colCal = objNS.GetDefaultFolder(olFolderCalendar).Items
    Set colSpanItems = DateSpan(colCal, dtStart, dtEnd)
    For Each objAppt In colSpanItems
    ' Debug.Print objAppt.Subject, objAppt.Start, objAppt.End, objAppt.RecurrenceState
    If objAppt.RecurrenceState = olApptOccurrence Then
    objAppt.Delete
    End If
    Next
    Set objAppt = Nothing
    Set colSpanItems = Nothing
    Set colCal = Nothing
    End Sub</pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •