Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub SetAlarms()
Dim myOlApp As Object, myEvent As AppointmentItem
Dim nsNameSpace As NameSpace, myFolderCalendar As MAPIFolder
On Error GoTo err_Exit
Set myOlApp = CreateObject("Outlook.Application")
Set nsNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolderCalendar = nsNameSpace.GetDefaultFolder(olFolderCalendar)
Set myEvent = myOlApp.CreateItem(olAppointmentItem)
myEvent.start = [blue]Me.StartDateTime[/blue] 'The due date and time field on your form
myEvent.Subject = [blue]Me.QuoteNumber[/blue] 'The quote number field on your form
myEvent.Save
Set myOlApp = Nothing
Set myEvent = Nothing
Set myFolderCalendar = Nothing
MsgBox ("Event created in your Outlook calendar.")
Exit Sub
err_Exit:
MsgBox ("Error " & Err.Number & ": " & Err.Description)
End Sub