Sub
outlook_calendaritemsexport()
Dim
o
As
Object
, R as
Long
Set
o = CreateObject(
"Outlook.Application"
)
Dim
ons
As
Object
Set
ons = o.GetNamespace(
"MAPI"
)
Dim
myfol
As
Object
Set
myfol = ons.GetDefaultFolder(9)
Dim
myapt as
Object
Range(
"A:D1"
).Value = Array(
"SUBJECT"
,
"FROM"
,
"TILLWHAT"
,
"LOCATION"
)
R = 2
For
Each
myapt
In
my myfol.Items
Cells(R, 1) = myapt.Subject
Cells(R, 2) = myapt.Start
Cells(R, 3) = myapt.
End
Cells(R, 4) = myapt.Location
R = R + 1
Next
Set
o =
Nothing
Set
ons =
Nothing
Set
myfol =
Nothing
Set
myapt =
Nothing