Code 2: läuft in 2010
Public
Function
AktivesDatum()
As
Date
Dim
objTemp
As
AppointmentItem, objExplorer
As
Explorer
Dim
objCD
As
CommandBarButton
Dim
objFolder
As
Folder
Dim
objCB
As
CommandBarButton
Set
objExplorer = ActiveExplorer
If
Not
objExplorer
Is
Nothing
Then
Set
objFolder = objExplorer.CurrentFolder
If
objFolder.DefaultItemType = olAppointmentItem
Then
Set
objCB = objExplorer.CommandBars.FindControl(, 1106)
If
Not
objCB
Is
Nothing
Then
objCB.Execute
Set
objTemp = Application.ActiveInspector.CurrentItem
AktivesDatum = objTemp.Start
objTemp.Close (olDiscard)
End
If
End
If
End
If
Set
objTemp =
Nothing
Set
objCD =
Nothing
Set
objFolder =
Nothing
Set
objExplorer =
Nothing
End
Function