-1

I need to create an exception IPM.OLE.CLASS item in Outlook So need to delete or change one appointment instance of a recurring appointment Maybe I could not do it correctly, all have IPM.Note class :( How to make it?

Created a recurring appointment in Outlook and deleted a single entry of it, could not get IPM.OLE.CLASS

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 09 '23 at 11:07

2 Answers2

0

To create an exception in MAPI, you first need to modify the recurrence pattern blob to specify a changed exception, you will then need to create an embedded message attachment and specify some properties on both the attachment itself and the embedded message.

enter image description here

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

The IPM.OLE.CLASS class corresponds to the exception item of a recurrence series. There is no quite an easy way for creating such items from scratch in Outlook. You can set a message class for newly-created and non-saved yet items. Moreover, you need to associate an item with a recurring appointments.

Created a recurring appointment in Outlook and deleted a single entry of it, could not get IPM.OLE.CLASS

Instead of deleting an entry you can change the time of a specific entry and save it. A raw sketch:

 Set myRecurrPatt = myApptItem.GetRecurrencePattern  
 myRecurrPatt.RecurrenceType = olRecursDaily  
 myRecurrPatt.PatternStartDate = #2/2/2023#   
 myRecurrPatt.PatternEndDate = #2/2/2024# 
 
 myApptItem.Save  
 
 'Access the items in the Calendar folder to locate  
 'the master AppointmentItem for the new series.  
 Set myNamespace = Application.GetNamespace("MAPI")  
 Set myFolder = myNamespace.GetDefaultFolder(olFolderCalendar)  
 Set myItems = myFolder.Items  
 Set myApptItem = myItems("Meet with Boss")  
 
 
 'Get the recurrence pattern for this appointment  
 'and obtain the occurrence for 3/12/23.  
 myDate = #3/12/2023 3:00:00 PM#  
 Set myRecurrPatt = myApptItem.GetRecurrencePattern  
 Set myOddApptItem = myRecurrPatt.GetOccurrence(myDate)  
 
 'Save the existing subject. Change the subject and  
 'starting time for this particular appointment and save it.  
 saveSubject = myOddApptItem.Subject  
 myOddApptItem.Subject = "Meet NEW Boss"  
 newDate = #3/12/2023 3:30:00 PM#  
 myOddApptItem.Start = newDate  
 myOddApptItem.Save 
 
 'Release references to the appointment series  
 Set myApptItem = Nothing  
 Set myRecurrPatt = Nothing  
 
 
 'Get the recurrence pattern for the master  
 'AppointmentItem. Access the collection of  
 'exceptions to the regular appointments.  
 Set myItems = myFolder.Items  
 Set myApptItem = myItems("Meet with Boss")  
 
 Set myRecurrPatt = myApptItem.GetRecurrencePattern  
 Set myException = myRecurrPatt.Exceptions.Item(1) 
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45