Die Frage hab ich schon mal gestellt, eventuell ist sie durch die Antworten ein wenig untergegangen.
Ich hab hier diesen Code für Kalendersynchronisation bekommen.
Dieser funktioniert Perfekt
Das I Tüpfelchen wäre noch wenn der Eintrag von der Spalte a1 als Betreff mit synchronisiert wird
Vielen lieben Dank für eure Mühe
Hier der Code:
Option Explicit
Sub sbCreateAppM(ByVal zeile As Long, ByVal spalte As Long)
Dim lobjOutl As Object, ldtAppM As Date, lboExist As Boolean
Dim lobjNS As Object, lobjAppmFolder As Object, lobjAppMs As Object, lobjAppM As Object
Set lobjOutl = CreateObject("Outlook.Application")
Set lobjNS = lobjOutl.GetNamespace("MAPI")
Set lobjAppmFolder = lobjNS.GetDefaultFolder(9) 'olFolderCalendar
ldtAppM = Cells(zeile, spalte).Value
Set lobjAppMs = lobjAppmFolder.Items.Restrict("[Start] >= '" & Format(ldtAppM, "dd""/""mm""/""yyyy hh:nn") & "' and [Start] = '" & Format(ldtAppM + 1, "dd""/""mm""/""yyyy hh:nn") & "'")
For Each lobjAppM In lobjAppMs
If Year(lobjAppM.Start) = Year(ldtAppM) Then
If lobjAppM.Subject = Cells(zeile, 3).Value & " vs " & Cells(zeile, 5).Value Then
lboExist = True
Exit For
End If
End If
Next
If lboExist = False Then
Set lobjAppM = lobjOutl.CreateItem(1)
With lobjAppM
.Subject = Cells(zeile, 3).Value & " vs " & Cells(zeile, 5).Value
Dim zeit$
zeit = " " & InputBox("Bitte Uhrzeit im Format hh:mm eingeben")
.Start = Format(Cells(zeile, spalte).Value, "dd.mm.yyyy") & zeit 'Uhrzeit anpassen
.End = Format(Cells(zeile, spalte).Value, "dd.mm.yyyy") & zeit 'Uhrzeit anpassen
.Save
End With
End If
End Sub