Meeting vs Appointment

Hi Aspose

If we use Aspose Email for Java 17.6 and load a basic ICS file using the code below, it always loads into Outlook as a Meeting, e.g. the title bar lists “Subject - Meeting”. Is there a way to instead load as an Appointment, e.g. if there are no other attendees?

Thanks

ICS
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//Test Company//NONSGML My Product//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20170722T220000Z
DTEND:20170722T230000Z
DTSTAMP:20170322T004138Z
CREATED:20170314T005215Z
LAST-MODIFIED:20170322T013130Z
UID:87ADB15FB0731E4DCC257D1E0003D023
SEQUENCE:0
ORGANIZER;CN=“John Lowndes”:mailto:John_Lowndes@xxyyzz.com
ATTENDEE;CN=“Joe User”;RSVP=FALSE:mailto:joe.user@xxyyzz.com
SUMMARY:Test Meeting
DESCRIPTION:This is the description
END:VEVENT
END:VCALENDAR

Code

String pathPSTFileStr = “c:\temp\testPST.pst”;
String testFile = “c:\temp\test.ics”;

PersonalStorage pst = PersonalStorage.create(pathPSTFileStr, 0);
Appointment calDoc = Appointment.load(testFile);
MailMessage calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
MapiMessage calMapiMsg = MapiMessage.fromMailMessage(calMsg);
FolderInfo calFolder = pst.createPredefinedFolder(“Calendar”, StandardIpmFolder.Appointments);
MapiCalendar mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);

@ionet,

Thank you for contacting Aspose support team.

I have checked the sample .ics file by saving it in file and opened it directly in Outlook 2013. It is observed that it is opened as Meeting rather than Appointment in Outlook. This shows that this ics file is a meeting, that is why it is opened as meeting from the output PST file. You may please try some appointment file to add to PST file and test the behavior again. I am afraid that there is no such option in Aspose.Email for Java that can be used to convert this meeting object to appointment object.

Please feel free to write us back if you have any other query in this regard.