Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Excel VBA - Creating calendar item with Description and reminder

Hi. How do I update the following code so that I can include a description and set a reminder to an hour before

Sub CreateCalendarItem(olkApp As Outlook.Application, _
            strSubject As String, strDate As String, _
            strTime As String)
   Dim olkAppt As Outlook.AppointmentItem
   Dim dte As Date
   
   ' Must add Outlook to references for this to work
   dte = CDate(strDate & " " & strTime)
   
   With olkApp
      Set olkAppt = .CreateItem(Outlook.OlItemType.olAppointmentItem)
      With olkAppt
         .Start = dte
         .Subject = strSubject
         .ReminderSet = False
         olkAppt.Save
      End With
   End With
   
   ' Clean up.
   Set olkAppt = Nothing
End Sub
Microsoft ExcelOutlook

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
zorvek (Kevin Jones)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Murray Brown

ASKER
thanks
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23