Ich habe da ein Problem. Habe ein Modul erstellt, das Termine, die ich in Excel eingebe per Button an Outlook übergeben werden.
Da ich aber immer ein ganzes Halbjahr übergebe, sind die Termine in Outlook doppelt und dreifach gespeichert.
Kann mir jemand sagen, wie ich das umgehen kann.
Hier mein Code:
Sub AnOutlookSenden()
Dim objOutlook As Outlook.Application
Dim apptOutlook As Outlook.AppointmentItem
Dim name As String
Dim i As Integer
name = Cells(ActiveCell.Row, 3)
Set objOutlook = CreateObject("Outlook.Application")
For i = start To ende
Set apptOutlook = objOutlook.CreateItem (olAppointmentItem)
With apptOutlook
If ActiveCell = "U" Then
.Subject = name & " Urlaub"
.Location = "zuhause"
.start = Cells(2, ActiveCell.Column)
.AllDayEvent = True
.ReminderMinutesBeforeStart = 30
.ReminderSet = True
.Save
End If
End With
ActiveCell.Offset(0, 1).Activate
Next
MsgBox "Urlaub wurde übertragen!"
Set apptOutlook = Nothing
Set objOutlook = Nothing
End Sub
Schonmal vielen Dank im voraus.
Bis dann,
Ramin