0
My OutlookカレンダーでAPPOINTMENTSのシリーズとその変更方法を見つけるにはどうすればよいですか?VBAで一連の予定を変更する
次のコードを使用して、1つのアポイント/会議を検索して変更します。
Private Sub ChangeAppointment(SearchDate As String, SearchApptSubject As String)
'SearchDate = "7/12/2017"
'SearchApptSubject = "Leave Office!"
Dim oOL As New Outlook.Application
Dim oNS As Outlook.NameSpace
Dim oAppointments As Object
Dim oAppointmentItem As Outlook.AppointmentItem
Dim ItemDate As String
Dim strSubject As String, strBody As String
Set oNS = oOL.GetNamespace("MAPI")
Set oAppointments = oNS.GetDefaultFolder(olFolderCalendar)
For Each oAppointmentItem In oAppointments.Items
ItemDate = Format(oAppointmentItem.Start, "mm/dd/yy")
ItemSubject = oAppointmentItem.Subject
If SearchDate = ItemDate And SearchApptSubject = ItemSubject Then 'Check all events on current date.
oAppointmentItem.Start = cdate("7/12/2017 6:00 PM")
oAppointmentItem.END = cdate("7/12/2017 6:01 PM")
oAppointmentItem.Subject = 'Time to go home!'
oAppointmentItem.Save
Exit For
End If
Next
End Sub
しかし、シリーズの一部である予定を見つけようとすると、コードはそれを見つけられません。私はシリーズで予定を見つける方法と、そのシリーズでただ1つの予定を変更する方法を知りたいと思います。前もって感謝します!