This example illustrates how to create and send an appointment in Outlook from within MATLAB using ActiveX:
h = actxserver('outlook.Application')
appointment = h.CreateItem('olAppointmentItem')
appointment.Subject = 'Myappointment'
appointment.Body = 'This appointment was created in MATLAB'
appointment.Location = 'myLocation'
appointment.Start = '04/26/2006'
appointment.End = '04/27/2006'
appointment.ReminderSet = 1
appointment.ReminderMinutesBeforeStart = 5
appointment.IsOnlineMeeting = 0
appointment.Save()
You can attach this appointment to an email and send it:
mail = h.CreateItem('olMail');
mail.Subject = 'This email was sent from within MATLAB';
mail.To = 'myemail@mathworks.com';
mail.Body = 'Please find your appointment attached';
mail.BodyFormat = 'olFormatHTML';
mail.attachments.Add(appointment);
mail.Send;
h.release;
Best Answer