View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Van Eygen[_2_] Frank Van Eygen[_2_] is offline
external usenet poster
 
Posts: 5
Default Outlook private calendar

Hello,
I have a macro in Excel that generates appointments in Outlook calendar.

How do I do the same but with a Personal Outlook calendar?


Dim olApp As Outlook.Application
Dim olApt As AppointmentItem
Set olApp = New Outlook.Application
Set olApt = olApp.CreateItem(olAppointmentItem)
With olApt
..Start = Date & " " & txbStopUur 'Sheet4.Range("B14").Value
..End = Date & " " & txbStopUur
..Subject = "Stoptijd berekend voor: " & txbStopUur 'Sheet4.Range("G3") + "
" + Sheet4.Range("M14").Value
..Body = "Priktijd berekend op " & Date & " om: " & txbStartUur & "u" &
txbStartMin & Chr(10) & _
"Berekende stoptijd is : " & txbStopUur
..BusyStatus = olFree
..ReminderMinutesBeforeStart = 15
..Sensitivity = olPrivate
..Save
End With
Set olApt = Nothing
Set olApp = Nothing
MsgBox "Your stop time registration has been sent to Outlook.", , "For
Information"

End Sub