Delphi Code - Create Microsoft Outlook Appointment Item and Invite Attendees
Here is a simple Delphi procedure that uses Microsoft Outlook to create a simple calendar meeting item programmatically. The appointment meeting status is set to 1. Required and optional attendees are specified. After the meeting is saved, calendar meeting invitations are sent (via email) to all required and optional attendees. The code works well whether or not Outlook is already open. However, please note that the code will not work if Outlook is closed, and your installed Outlook requires any form of authentication upon launching the program. The most relevant parts of the code are highlighted. Comments are included to explain the code. If you copy and paste the code into your program, be sure to change the form and procedure names to match your setup. For additional Outlook automation solutions, see Microsoft Outlook Automation with Delphi.
— share —
procedure TForm1.UseDelphiToCreateOutlookAppointmentAndInviteAttendees(Sender: TObject); var OutlookApplication, OutlookAppointmentItem: Variant; begin //be sure ComObj and Variants units are included in the "uses" clause