We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Load VCS and save as ICS

Need a quick help, the sample to load VCS file and save it as ICS?
Thanks :slight_smile:


Please use the following code example to convert VCS to ICS file format.

AppointmentLoadOptions options = new AppointmentLoadOptions();
Appointment app = Appointment.Load(MyDir + "input.vcs", options);
app.Save(MyDir + "output.ics", AppointmentSaveFormat.Ics);
1 Like

One issue here: input file is VCS (and maybe ICS) and need to be saved as ICS:

But I need to use the new added feature: EMAILNET-40795 > Provide APIs to set product ID

So this works:
MyAppointment.Save(“xxx”, AppointmentSaveFormat.Ics)

But not this one:
MyAppointment.Save(“xxx”, MapiCalendarIcsSaveOptions…)

Hello @australian.dev.nerds,

Isn’t ICS based on VCS? As far as I know, ICS is essentially version 2.0 of VCS. I think that all methods available for ICS will also be applicable for VCS. Thanks.

1 Like

Yes, 100% correct, I meant using the given code, when loading VCS to save as ICS:
Appointment.Save accepts AppointmentSaveFormat.Ics but not MapiCalendarIcsSaveOptions

Hello @australian.dev.nerds,

Sorry, but I’m not quite sure why you need MapiCalendarIcsSaveOptions.
There is AppointmentIcsSaveOptions class for saving Appointment in ics format.

Dim MyAppointment = Appointment.Load("my.vcs", appLoadoOptions)
Dim icsSaveOptions = New AppointmentIcsSaveOptions() With {
        .ProductId = "Some prodId"
MyAppointment.Save("my.ics", icsSaveOptions)

Please correct me if you mean another use case.

1 Like

Hello and thanks so much for correcting me.

The sample code provided in the release notes here:

AppointmentIcsSaveOptions does not have KeepOriginalDateTimeStamp, and don’t know about SequenceId format…
Best :slight_smile:


AppointmentIcsSaveOptions does not have KeepOriginalDateTimeStamp, and don’t know about SequenceId format…

Ooh yes, you’re right. The best solution would be creating an unified save options class for both Appointment and MapiCalendar instead of two separate ones. Created the EMAILNET-40916 for this. Thank you.

1 Like

Thanks, merging AppointmentIcsSaveOptions and MapiCalendarIcsSaveOptions would be great :slight_smile:

Just a note that we don’t have 2 save options for calendar, but 7, seems many developers worked on the code over the years:




vs 1 for load: Email.Calendar.AppointmentLoadOptions


Noted. Thank you for paying attention to this.