ich habe folgenden Code, mit dem ich Aufgaben aus Outlook an Excel exportiere:
Sub olTasks()
Dim olTasks As MAPIFolder, oTask As TaskItem, i%, xl As Object, ws As Object
Set olTasks = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
Set xl = CreateObject("Excel.Application")
Set ws = xl.Workbooks.Open("U:\Tasks.xlsx")
xl.WindowState = 2
xl.Visible = True
i = 2
For Each oTask In olTasks.Items
With ws.Sheets(1)
.Cells(i, 1) = oTask.Subject
.Cells(i, 2) = oTask.Body
.Cells(i, 3).Offset(, 1) = oTask.LastModificationTime
.Cells(i, 4) = Format(oTask.startDate, "DD.MM.YYYY")
.Cells(i, 5) = Format(oTask.DueDate, "DD.MM.YYYY")
.Cells(i, 6) = oTaskInProgress
.Columns.autofit
End With
i = i + 1
Next
End Sub
Jetzt möchte ich das gleich auch mit meinen Terminen machen. Wie muss ich den Code abändern?
Vielen Dank für eure Hilfe und Tipps!
Gruß,
Peter