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);