Hello Ton,
To automate Outlook and create appointment items using Access, please add reference "Microsoft Outlook X.0 Object Library" (X depends on your Office version), then you could use the following code to create an appointment.
Sub CreateApp()
Dim olApp As Outlook.Application
Dim olAppItem As Outlook.AppointmentItem
Set olApp = CreateObject("Outlook.Application")
Set olAppItem = olApp.CreateItem(olAppointmentItem)
With olAppItem
.Subject = ""
.Body = ""
.ReminderSet = True
.BusyStatus = olFree
.RequiredAttendees = ""
.Start = Today 'Date
.End = Today
.Save ' .Send or .Display
End With
Set olAppItem = Nothing
Set olApp = Nothing
End Sub
The following links would be helpful:
Automating Outlook from a Visual Basic Application.
Scheduling Appointments in Outlook From Excel
If you have any issues, please let me know.
Regards,
Celeste
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.