Alle Kalender aus Outlook auslesen und in Excel Datei speichern

  • Excel

Es gibt 8 Antworten in diesem Thema. Der letzte Beitrag () ist von tgdwero3.

    Alle Kalender aus Outlook auslesen und in Excel Datei speichern

    Hallo,

    ich möchte alle meine Kalendereinträge auslesen und in einer Excel-Datei speichern oder in einer CSV-Datei speichern.
    Ich habe bisher entweder die Möglichkeit gehabt, manuell per Export den Kalender als CSV-Datei zu speichern.
    Leider ist da nur mein Kalender und komischerweise auch ein Kalender den ein Kollege geteilt hat mit drin, aber nicht alle Kalender die ich in Outlook habe.

    Ich habe ein Skript, welches meine Kalendereinträge in eine Excel-Datei einliest, leider nicht die anderen Kalender.
    Im Skript habe ich folgendes stehen:

    Visual Basic-Quellcode

    1. 'Durchlaufe alle Termine des aktuellen Standardkalenders
    2. i = i + 1
    3. For Each Termin In olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
    4. Set myTerminPatt = Termin.GetRecurrencePattern
    5. If Format(Termin.Start, "dd.mm.yyyy") >= startDate And Format(Termin.End, "dd.mm.yyyy") <= endDate Then
    6. If Not Termin.AllDayEvent Then Trag_ein Termin, i, False
    7. End If
    8. If myTerminPatt.RecurrenceType = olRecursDaily Then
    9. If Format(myTerminPatt.PatternEndDate, "dd.mm.yyyy") >= startDate Then
    10. Trag_ein_Recurr Termin, i, False, startDate, endDate
    11. End If
    12. End If
    13. Next
    14. Range("C1").Select
    15. Range("A1:H" & Range("A1").CurrentRegion.Rows.Count).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess


    [/font]Ich möchte aber alle Kalender auslesen und in der Tabelle einspeichern und nicht nur den Standardkalender.
    Kann Mir da vielleicht Jemand helfen? ?(

    ~blaze~: Neu formatiert, Thema verschoben
    Alter Code

    'Durchlaufe alle Termine des aktuellen Standardkalenders
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']i = i + 1[/font]
    For Each [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Termin [/font]In [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items[/font]
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]Set [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']myTerminPatt = Termin.GetRecurrencePattern[/font]
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]If [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Format(Termin.Start, "dd.mm.yyyy") >= startDate [/font]And [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Format(Termin.End, "dd.mm.yyyy") <= endDate [/font]Then
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]If Not [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Termin.AllDayEvent [/font]Then [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Trag_ein Termin, i, [/font]False
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]End If
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]If [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']myTerminPatt.RecurrenceType = olRecursDaily [/font]Then
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]If [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Format(myTerminPatt.PatternEndDate, "dd.mm.yyyy") >= startDate [/font]Then
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] Trag_ein_Recurr Termin, i, [/font]False[font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'], startDate, endDate[/font]
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]End If
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)'] [/font]End If
    Next
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Range("C1").Select[/font]
    [font='Arial, FixedSys; font-size: small; background-color: rgb(204, 204, 204)']Range("A1:H" & Range("A1").CurrentRegion.Rows.Count).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von „~blaze~“ ()

    Danke schonmal für die Hilfe. Es geht darum, dass ich meinen Standardkalender habe und möchte die anderen Kalender, welche freigegeben wurden ebenfalls in die selbe Excel-Datei auslesen.

    Spoiler anzeigen

    Visual Basic-Quellcode

    1. Option Explicit
    2. Sub Kalenderdaten_auf_Terminbereich_einlesen()
    3. '(C) Ramses
    4. 'Zunächst Verweis auf OL-Bibliothek erstellen
    5. 'Early Binding ab Outlook 2003 nicht möglich
    6. 'weil die Rückgabewerte der ITEM-Indexes zufällig ist und von der
    7. 'Installation abhängt !!
    8. '-------------
    9. 'Version Office 2000 (nicht getestet sollte aber tun)
    10. 'Dim olApp As Outlook.Application
    11. 'Dim Termin As Outlook.AppointmentItem
    12. 'Dim myTerminPatt As Outlook.RecurrencePattern
    13. '-------------
    14. 'Set olApp = New outlook.Application
    15. 'Set Termin = olApp.CreateItem(olAppointmentItem)
    16. '-------------
    17. 'Version XP
    18. Dim olApp As Object
    19. Dim Termin As Object
    20. Set olApp = CreateObject("Outlook.Application")
    21. 'Allgemein gültig
    22. Dim i As Long, j As Long, myErr As Integer
    23. Dim startInput As String, startDate As Date
    24. Dim endInput As String, endDate As Date
    25. Dim myTerminPatt As Object
    26. On Error GoTo myErrorhandler
    27. 'Erst mal alles löschen
    28. Cells.ClearContents
    29. Cells.Interior.ColorIndex = xlNone
    30. 'Startdatum abfragen
    31. startInput = InputBox("Bitte Datum eingeben im Format ""01.01.2004""", "Datum für Terminsuche", Format(Now, "dd.mm.yyyy"))
    32. myErr = 1
    33. If startInput = "" Then
    34. MsgBox "Abbruch des Makros durch Benutzer"
    35. Exit Sub
    36. ElseIf Not IsDate(DateValue(startInput)) Then
    37. MsgBox "Falsches Datum eingegeben"
    38. Exit Sub
    39. End If
    40. myErr = 2
    41. endInput = InputBox("Bitte Datum eingeben im Format ""01.01.2004""", "Datum für Terminsuche", Format(DateValue(startInput) + 7, "dd.mm.yyyy"))
    42. If endInput = "" Then
    43. MsgBox "Abbruch des Makros durch Benutzer"
    44. Exit Sub
    45. ElseIf Not IsDate(DateValue(endInput)) Then
    46. MsgBox "Falsches Datum eingegeben"
    47. Exit Sub
    48. End If
    49. myErr = 0
    50. 'Variable definitiv zuweisen
    51. startDate = DateValue(startInput)
    52. endDate = DateValue(endInput)
    53. 'Variable fü¨r Termin neu setzen
    54. 'Set Termin = olApp.CreateItem(Appointment)
    55. Cells(1, 1) = "Termine vom " & Format(startDate, "dd.mm.yyyy") & " bis " & Format(endDate, "dd.mm.yyyy")
    56. i = 3
    57. Application.ScreenUpdating = False
    58. Cells(i, 1) = "Termin Betreff"
    59. Cells(i, 2) = "Inhalt/Body"
    60. Cells(i, 3) = "Start"
    61. Cells(i, 4) = "Ende"
    62. Cells(i, 5) = "Erinnerung Minuten"
    63. Cells(i, 6) = "Anzeigen als"
    64. Cells(i, 7) = "Kategorien"
    65. Cells(i, 8) = "Erstellt am"
    66. Range(Cells(i, 1), Cells(i, 8)).Select
    67. Selection.Interior.ColorIndex = 15
    68. 'Durchlaufe alle Termine des aktuellen Standardkalenders
    69. i = i + 1
    70. For Each Termin In olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
    71. Set myTerminPatt = Termin.GetRecurrencePattern
    72. If Format(Termin.Start, "dd.mm.yyyy") >= startDate And Format(Termin.End, "dd.mm.yyyy") <= endDate Then
    73. If Not Termin.AllDayEvent Then Trag_ein Termin, i, False
    74. End If
    75. If myTerminPatt.RecurrenceType = olRecursDaily Then
    76. If Format(myTerminPatt.PatternEndDate, "dd.mm.yyyy") >= startDate Then
    77. Trag_ein_Recurr Termin, i, False, startDate, endDate
    78. End If
    79. End If
    80. Next
    81. Range("C1").Select
    82. Range("A1:H" & Range("A1").CurrentRegion.Rows.Count).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess
    83. 'Jetzt die Ereignisse
    84. i = i + 1
    85. j = i
    86. Cells(i, 1) = "Ganzer Tag Betreff"
    87. Cells(i, 2) = "Ereignis am"
    88. Cells(i, 3) = "Erinnerung Minuten"
    89. Cells(i, 4) = "Anzeigen als"
    90. Cells(i, 5) = "Kategorien"
    91. Cells(i, 6) = "Erstellt am"
    92. Range(Cells(i, 1), Cells(i, 6)).Select
    93. Selection.Interior.ColorIndex = 15
    94. i = i + 1
    95. For Each Termin In olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
    96. Debug.Print Termin.Start
    97. If DateSerial(Year(startDate), Month(Termin.Start), Day(Termin.Start)) >= startDate And DateSerial(Year(startDate), Month(Termin.Start), Day(Termin.Start)) <= endDate Then
    98. If Termin.AllDayEvent And Not Termin.IsRecurring Then Trag_ein Termin, i, True
    99. End If
    100. Next
    101. Range("C" & j).Select
    102. Range("A1:F" & Range("A" & j).CurrentRegion.Rows.Count).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess
    103. 'und noch die jährlichen Ereignisse
    104. i = i + 2
    105. j = i
    106. Cells(i, 1) = "Betreff ""Jährliches Ereignis"""
    107. Cells(i, 2) = "jährliches Ereignis am"
    108. Cells(i, 3) = "Erinnerung Minuten"
    109. Cells(i, 4) = "Anzeigen als"
    110. Cells(i, 5) = "Kategorien"
    111. Cells(i, 6) = "Erstellt am"
    112. Range(Cells(i, 1), Cells(i, 6)).Select
    113. Selection.Interior.ColorIndex = 15
    114. i = i + 1
    115. For Each Termin In olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items
    116. If DateSerial(Year(startDate), Month(Termin.Start), Day(Termin.Start)) >= startDate And DateSerial(Year(startDate), Month(Termin.Start), Day(Termin.Start)) <= endDate Then
    117. If Termin.AllDayEvent And Termin.IsRecurring Then Trag_ein Termin, i, True
    118. End If
    119. Next
    120. Range("C" & j).Select
    121. Range("A1:F" & Range("A" & j).CurrentRegion.Rows.Count).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess
    122. 'Variablen leeren
    123. Set Termin = Nothing
    124. Set olApp = Nothing
    125. Columns("A:H").Select
    126. Columns("A:H").EntireColumn.AutoFit
    127. Range("A1").Select
    128. Cells.RowHeight = "12.75"
    129. 'Ausstieg
    130. ErrorExit:
    131. Application.ScreenUpdating = True
    132. If myErr = 0 And Err.Number = 0 Then
    133. MsgBox "Kalenderdaten eingelesen"
    134. End If
    135. Exit Sub
    136. myErrorhandler:
    137. Select Case myErr
    138. Case 1
    139. MsgBox "Ungültiges Startdatum"
    140. Resume ErrorExit
    141. Case 2
    142. MsgBox "Ungültiges Enddatum"
    143. Resume ErrorExit
    144. End Select
    145. MsgBox Err.Number & " " & Err.Description
    146. Resume ErrorExit
    147. End Sub
    148. Sub Trag_ein(Termin, i As Long, Ereignis As Boolean)
    149. Dim Anzeigen_als As String
    150. Dim Erinnerung As String
    151. Select Case Termin.BusyStatus
    152. Case olFree
    153. Anzeigen_als = "Frei"
    154. Case olTentative
    155. Anzeigen_als = "Unter Vorbehalt"
    156. Case olBusy
    157. Anzeigen_als = "Gebucht"
    158. Case olOutOfOffice
    159. Anzeigen_als = "Abwesend"
    160. End Select
    161. Cells(i, 1) = Termin.Subject
    162. If Not Ereignis Then
    163. Cells(i, 2) = Termin.Body
    164. Cells(i, 3) = Termin.Start
    165. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    166. Cells(i, 4) = Termin.End
    167. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    168. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    169. Cells(i, 6) = Anzeigen_als
    170. Cells(i, 7) = Termin.Categories
    171. Cells(i, 8) = Termin.CreationTime
    172. Else
    173. Cells(i, 2) = Termin.Start
    174. Cells(i, 2).NumberFormat = "dd/mm/yyyy hh:mm"
    175. If Termin.ReminderMinutesBeforeStart <= 60 Then
    176. Erinnerung = Termin.ReminderMinutesBeforeStart & " Minuten"
    177. ElseIf Termin.ReminderMinutesBeforeStart / 60 < 24 Then
    178. Erinnerung = Termin.ReminderMinutesBeforeStart / 60 & " Stunden"
    179. Else
    180. Erinnerung = Termin.ReminderMinutesBeforeStart / 60 / 24 & " Tage"
    181. End If
    182. Cells(i, 3) = Erinnerung
    183. Cells(i, 3).NumberFormat = "General"
    184. Cells(i, 4) = Anzeigen_als
    185. Cells(i, 5) = Termin.Categories
    186. Cells(i, 6) = Termin.CreationTime
    187. End If
    188. i = i + 1
    189. End Sub
    190. Sub Trag_ein_Recurr(Termin, i As Long, Ereignis As Boolean, startDate As Date, endDate As Date)
    191. Dim Anzeigen_als As String
    192. Dim Erinnerung As String
    193. Dim n As Integer
    194. Dim myReccTermin As Object
    195. Select Case Termin.BusyStatus
    196. Case olFree
    197. Anzeigen_als = "Frei"
    198. Case olTentative
    199. Anzeigen_als = "Unter Vorbehalt"
    200. Case olBusy
    201. Anzeigen_als = "Gebucht"
    202. Case olOutOfOffice
    203. Anzeigen_als = "Abwesend"
    204. End Select
    205. Set myReccTermin = Termin.GetRecurrencePattern
    206. If startDate = endDate Then
    207. Cells(i, 1) = Termin.Subject
    208. Cells(i, 3) = startDate + (i - 1)
    209. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    210. Cells(i, 4) = startDate + (i - 1)
    211. Cells(i, 4).Interior.ColorIndex = 3
    212. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    213. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    214. Cells(i, 6) = Anzeigen_als
    215. Cells(i, 7) = Termin.Categories
    216. Cells(i, 8) = Termin.CreationTime
    217. i = i + 1
    218. Set myReccTermin = Nothing
    219. Exit Sub
    220. End If
    221. If myReccTermin.PatternEndDate < endDate Then
    222. Debug.Print myReccTermin.PatternEndDate
    223. If myReccTermin.PatternStartDate > startDate Then
    224. For n = 1 To endDate - myReccTermin.PatternEndDate '(myReccTermin.PatternStartDate - startDate)
    225. Cells(i, 1) = Termin.Subject
    226. Cells(i, 3) = myReccTermin.PatternStartDate + n
    227. Cells(i, 3).Interior.ColorIndex = 3
    228. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    229. Cells(i, 4) = myReccTermin.PatternStartDate + n
    230. Cells(i, 4).Interior.ColorIndex = 3
    231. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    232. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    233. Cells(i, 6) = Anzeigen_als
    234. Select Case myReccTermin.RecurrenceType
    235. Case 1
    236. Cells(i, 7) = "Täglich"
    237. Case 2, 3
    238. Cells(i, 7) = "Monatlich"
    239. Case 4
    240. Cells(i, 7) = "Wöchentlich"
    241. Case 5, 6
    242. Cells(i, 7) = "Jährlich"
    243. Case Else
    244. Cells(i, 7) = "Serie"
    245. End Select
    246. Cells(i, 8) = Termin.CreationTime
    247. i = i + 1
    248. Next n
    249. Else
    250. For n = 1 To myReccTermin.PatternEndDate - startDate
    251. Cells(i, 1) = Termin.Subject
    252. Cells(i, 3) = startDate + n
    253. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    254. Cells(i, 4) = startDate + n
    255. Cells(i, 4).Interior.ColorIndex = 3
    256. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    257. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    258. Cells(i, 6) = Anzeigen_als
    259. Select Case myReccTermin.RecurrenceType
    260. Case 1
    261. Cells(i, 7) = "Täglich"
    262. Case 2, 3
    263. Cells(i, 7) = "Monatlich"
    264. Case 4
    265. Cells(i, 7) = "Wöchentlich"
    266. Case 5, 6
    267. Cells(i, 7) = "Jährlich"
    268. Case Else
    269. Cells(i, 7) = "Serie"
    270. End Select
    271. Cells(i, 8) = Termin.CreationTime
    272. i = i + 1
    273. Next n
    274. End If
    275. End If
    276. If myReccTermin.PatternEndDate > endDate Then
    277. If myReccTermin.PatternStartDate > startDate Then
    278. For n = 1 To endDate - myReccTermin.PatternStartDate
    279. Cells(i, 1) = Termin.Subject
    280. Cells(i, 3) = myReccTermin.PatternStartDate + n
    281. Cells(i, 3).Interior.ColorIndex = 3
    282. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    283. Cells(i, 4) = myReccTermin.PatternStartDate + n
    284. Cells(i, 4).Interior.ColorIndex = 3
    285. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    286. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    287. Cells(i, 6) = Anzeigen_als
    288. Select Case myReccTermin.RecurrenceType
    289. Case 1
    290. Cells(i, 7) = "Täglich"
    291. Case 2, 3
    292. Cells(i, 7) = "Monatlich"
    293. Case 4
    294. Cells(i, 7) = "Wöchentlich"
    295. Case 5, 6
    296. Cells(i, 7) = "Jährlich"
    297. Case Else
    298. Cells(i, 7) = "Serie"
    299. End Select
    300. Cells(i, 8) = Termin.CreationTime
    301. i = i + 1
    302. Next n
    303. Else
    304. For n = 1 To myReccTermin.PatternEndDate - startDate
    305. Cells(i, 1) = Termin.Subject
    306. Cells(i, 3) = startDate + n
    307. Cells(i, 3).Interior.ColorIndex = 3
    308. Cells(i, 3).NumberFormat = "dd/mm/yyyy hh:mm"
    309. Cells(i, 4) = startDate + n
    310. Cells(i, 4).Interior.ColorIndex = 3
    311. Cells(i, 4).NumberFormat = "dd/mm/yyyy hh:mm"
    312. Cells(i, 5) = Termin.ReminderMinutesBeforeStart
    313. Cells(i, 6) = Anzeigen_als
    314. Select Case myReccTermin.RecurrenceType
    315. Case 1
    316. Cells(i, 7) = "Täglich"
    317. Case 2, 3
    318. Cells(i, 7) = "Monatlich"
    319. Case 4
    320. Cells(i, 7) = "Wöchentlich"
    321. Case 5, 6
    322. Cells(i, 7) = "Jährlich"
    323. Case Else
    324. Cells(i, 7) = "Serie"
    325. End Select
    326. Cells(i, 8) = Termin.CreationTime
    327. i = i + 1
    328. Next n
    329. End If
    330. End If
    331. Set myReccTermin = Nothing
    332. End Sub


    Das ist der Code, welcher bei Drücken eines Buttons die Termine einliest. Aber leider nur die des Standartkalenders.

    *Spoiler-BBCode eingefügt*

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Marcus Gräfe“ ()

    Es wäre wesentlich einfacher, wenn du deinen Code etwas modularer aufgebaut hättest.
    Von objektorientiert wage ich ja gar nicht zu reden.
    Geh weg vom Spaghetti-Code und versuche, Struktur in dein Programm zu bringen.

    Du musst halt eben, da wo du den Kalender holst (z.B. Zeile 72), statt .GetDefaultFolder die entsprechenden anderen Verfahren anwenden, um an deine gewünschte Kalender zu kommen.
    --
    If Not Program.isWorking Then Code.Debug Else Code.DoNotTouch
    --
    Danke für den Tipp,

    ich programmiere sonst nur Java(natürlich Objektorientiert).
    Aber in VB habe ich ehrlich gesagt noch nichts drauf und diesen Code nur im Internet gefunden.
    Leider ist ein VB-Skript das Einzige was ich für diesen Zweck gefunden habe.
    Ich habe auch in dieser Zeile andere Methoden eingefügt, leider kam es wiederholt zu Fehlermeldungen, nach dem ausführen.

    13 Typen unverträglich. Irgendwie mag er nicht mehrere Termine zur selben Zeit.
    Da muss wohl eine neue Tabelle her oder so

    Ich probier mal ein bisschen herum und schaue ob es dann geht.
    Falls Jemand mit mehr Erfahrung den Code ergänzen kann wäre das aber auch sehr hilfreich.

    Vielen Dank schonmal im Vorraus für die Hilfe.

    Gruß Korvi

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Korvinus“ ()

    Outlook kennt die Methode:

    VB.NET-Quellcode

    1. Outlook.Application.Session.GetFolderFromID(myEntryID, myStoreID)
    , welche Dir ein Folder Objekt zurückgibt.

    VB.NET-Quellcode

    1. Set myDestFolder = Outlook.Application.Session.GetFolderFromID(myEntryID, myStoreID)


    Die üble Sache daran ist, dass ich weder die myEntryID noch die myStoreID herleiten kann. Meine Lösung verwendet nun einen manuellen Eingriff:

    VB.NET-Quellcode

    1. Dim MyRootFolder As Outlook.MAPIFolder
    2. Set MyRootFolder = Outlook.Application.Session.PickFolder


    Jetzt kann ich auf die 3 relevanten Parameter ausgeben lassen (Name und die beiden IDs)

    VB.NET-Quellcode

    1. MsgBox MyRootFolder
    2. MsgBox MyRootFolder.EntryID
    3. MsgBox MyRootFolder.StoreID

    Da mir Dein Anwendungsfalls noch nicht ganz klar ist (sollen mehrere Kalender in dasselbe Excel-Sheet ausgegeben oder reicht es, wenn jeweils ein Kalender manuell ausgewählt und ausgelesen wird), kann ich leider nicht weiterhelfen.