A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Remove an individual occurrence of recurring appointment



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 3rd 07, 07:44 AM posted to microsoft.public.outlook.program_vba
Skipper
external usenet poster
 
Posts: 7
Default Remove an individual occurrence of recurring appointment

Hi i write this:

Sub CleanUp()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colCal As Outlook.Items
Dim objAppt As Outlook.AppointmentItem

Dim objTsk As Outlook.TaskItem

Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set colCal = objNS.GetDefaultFolder(olFolderCalendar).Items

On Error Resume Next

For Each objAppt In colCal
If objAppt.Categories = "Work" And DateDiff("d", objAppt.Start,
Now()) 0 Then
objAppt.Delete
End If
Next

Set objAppt = Nothing
Set objTsk = Nothing
Set colCal = Nothing
End Sub

the problem is if objAppt it's a recurring object the metod Delete remove
all, instead i want to remove only a individual occurrence.
TNX
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot reschedule an occurrence of the recurring appointment Tim Outlook - Calandaring 4 August 12th 06 08:55 AM
Sort by Next Occurrence of Recurring Appointment for Birthdays Josetta Outlook - General Queries 0 June 1st 06 12:06 AM
outlook today recurring occurrence AJ Meelan Outlook - Calandaring 3 January 31st 06 04:08 PM
How can I get a listing of each occurrence of a recurring event? Bethany Outlook - Calandaring 1 January 25th 06 01:39 PM
Can I skip one occurrence of a recurring APPOINTMENT? Sam Outlook - Calandaring 2 January 23rd 06 02:40 PM


All times are GMT +1. The time now is 10:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.