Back to Devexpress

SchedulerDataStorage.ExportToOutlook() Method

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerdatastorage-504a21c9.md

latest2.8 KB
Original Source

SchedulerDataStorage.ExportToOutlook() Method

Exports the data in the storage to the MS Outlook calendar.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public void ExportToOutlook()
vb
Public Sub ExportToOutlook

Remarks

Use the SchedulerDataStorage.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.

Example

This code snippet shows how to export only selected appointments to MS Outlook. Create a new storage, copy selected appointments to the storage and call the SchedulerDataStorage.ExportToOutlook method.

csharp
AppointmentBaseCollection apts = schedulerControl1.SelectedAppointments;
if (apts != null) {
    SchedulerStorage storage = new SchedulerStorage();
    foreach (Appointment apt in apts) {
        Appointment aptCopy = apt.Copy();
        storage.Appointments.Add(aptCopy);
    }
    storage.ExportToOutlook();
}
vb
Dim apts As AppointmentBaseCollection = schedulerControl1.SelectedAppointments
If apts IsNot Nothing Then
    Dim storage As New SchedulerStorage()
    For Each apt As Appointment In apts
        Dim aptCopy As Appointment = apt.Copy()
        storage.Appointments.Add(aptCopy)
    Next apt
    storage.ExportToOutlook()
End If

See Also

ImportFromOutlook()

ExportToVCalendar

SynchronizeOutlookWithStorage(String)

SynchronizeStorageWithOutlook(String)

SchedulerDataStorage Class

SchedulerDataStorage Members

DevExpress.XtraScheduler Namespace