Hello,
I try to read the local (or public) Outlook Calender with wincom.
But I have no success.
I have a function to save appointments to outlook, but now I want to read them.
I have found a outlook-Makro which display the appointments, but I have no Idea how to do this with WinCom in Genero.
Has anyone an idea
Kind regards
Stefan Serwe
Sub AlleTermineAuflisten()
Dim olApp As Outlook.Application
Dim olNameSpace As Outlook.NameSpace
Dim olCalendar As Outlook.MAPIFolder
Dim olAppointment As Outlook.AppointmentItem
Dim s As String
Dim d As Date
Dim t As Date
Dim ts As String
Dim n As Integer
Set olApp = CreateObject("Outlook.Application") 'oder New Outlook.Application
Set olNameSpace = olApp.GetNamespace("MAPI")
Set olCalendar = olNameSpace.GetDefaultFolder(olFolderCalendar)
n = 0
For Each olAppointment In olCalendar.Items
n = n + 1
s = olAppointment.Subject
If s = "" Then s = "-"
d = Fix(olAppointment.Start)
t = CDate(olAppointment.Start - d)
If t = 0 Then
ts = ""
Else
ts = " (" & CStr(t) & ")"
End If 't=0
Debug.Print Fix(d) & ": " & s & ts
Next 'olAppointment
Set olAppointment = Nothing
Set olCalendar = Nothing
Set olNameSpace = Nothing
Set olApp = Nothing
MsgBox "Insgesamt " & n & " Einträge.", vbInformation, "Fertig"
End Sub 'AlleTermineAuflisten