Retrieving Attachments from Calendar Items
Contents
[
Hide
]
Aspose.Email - Retrieving Attachments from Calendar Items
Aspose.Email provides an attachments collection that can be used to retrieve attachments associated with calendar items.
Java
String savedFile = dataDir + "AppWithAttachments.ics";
Appointment app2 = Appointment.load(savedFile);
System.out.println("Total Attachments: " + app2.getAttachments().size());
for (int i=0; i< app2.getAttachments().size();i++)
{
Attachment att = app2.getAttachments().get_Item(i);
System.out.println(att.getName());
//Save the attachment to disc
att.save(att.getName());
}
Download Running Code
Download Sample Code
For more details, visit Adding Attachments from Calendar Items.