Skip to main content

SchedulerDataStorage.CreateOutlookExporter() Method

Creates an object which provides the capability to control how data is exported to MS Outlook’s Calendar.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v22.2.dll


public AppointmentExporter CreateOutlookExporter()


Type Description

An AppointmentExporter object which can export data to MS Outlook’s Calendar.


Use the SchedulerDataStorage.ExportToOutlook method for data export to MS Outlook’s Calendar.

Use the CreateOutlookExporter method if you need to control how appointments are posted to the MS Outlook’s Calendar. Call this method to create an AppointmentExporter object and subscribe to its events to control export operations.


For data synchronization use AppointmentSynchronizer class descendant instead. It is created by SchedulerDataStorage.CreateOutlookExportSynchronizer method. Refer to Synchronization with Microsoft Outlook article for more information.


This code illustrates how to use the OutlookExport class to manage the process of exporting appointments to MS Outlook. Use the SchedulerDataStorage.CreateOutlookExporter method to create the exporter, subscribe to its AppointmentExporter.AppointmentExporting, AppointmentExporter.AppointmentExported and AppointmentExchanger.OnException events and call the AppointmentExporter.Export method.

View Example

private void ExportUsingCriteria() {
    OutlookExport exporter = schedulerControl1.Storage.CreateOutlookExporter() as OutlookExport;
    if (exporter != null) {
        exporter.AppointmentExporting += exporter_AppointmentExporting;
        exporter.AppointmentExported += exporter_AppointmentExported;
        exporter.OnException += exporter_OnException;
        exporter.CalendarFolderName = OutlookExchangeHelper.GetOutlookCalendarFolders().FirstOrDefault().FullPath;
        using (MemoryStream stream = new MemoryStream()) {
void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) {
    AddToLog(String.Format("Exporting Subj:{0}, started at {1:F} ...", e.Appointment.Subject, e.Appointment.Start));
    if (e.Appointment.IsRecurring) {
        e.Cancel = true;
        AddToLog("Cancelled because of its type (recurring).");
void exporter_AppointmentExported(object sender, AppointmentExportedEventArgs e) {
    AddToLog(String.Format("Successfully exported Subj:{0}, started at {1:F}!", e.Appointment.Subject, e.Appointment.Start)); 
void exporter_OnException(object sender, ExchangeExceptionEventArgs e) {
    string errText = e.OriginalException.Message;
    OutlookExport exporter = (OutlookExport)sender;
    e.Handled = true;
    //throw e.OriginalException;
See Also