我已经能够遍历附件并检索文件名,但我也想检索文件日期,并且似乎找不到任何说明如何完成的文档。
if (attachDoc.hasItem("Attachments")){
var attachment:NotesRichTextItem = attachDoc.getFirstItem("Attachments");
if (attachment != null) {
var eos:java.util.Vector = attachment.getEmbeddedObjects();
if (eos.isEmpty()) {
print("Attachments empty: no files do nothing");
} else {
//print("added attached");
var e:Enumeration = eos.elements();
while (e.hasMoreElements()) {
var eoA:EmbeddedObject = e.nextElement();
if(eoA.getFileSize() < 10000000){
print(eoA.getName());//this shows file names correctly
print(eoA.getFileDate());//this fails. Error calling method...
}else{
print("Unable to send the email. The file size is " + Math.round(eoA.getFileSize()/1000000) + "MB.");
}
}
}
}
attachment.recycle();
}
attachDoc.recycle();
}catch(e){
print("error with attachment " + e.toString());
}
收到您的帮助,我将不胜感激。