I have an NSF file which was produced by an EMC product. The attachments to the documents are not embedded in the “Body” rich item text (verified by API call), but seem to fall into this “V2-style attachment” category (they are shown in the UI in a separate ruled section at the bottom).
I am able to retrieve the attachment using the document.getAttachment(filename) call, however this only works if you know the name of the filename.
I have seen plenty of Lotusscript examples, such as these: http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21104835, which assume you can do something like this:
Forall i In doc.Items
If i.type = Attachment Then
Set emb = doc.GetAttachment(i.values(0))
…
In Java, this does not work. Calling item.getValues() throws an exception:
NotesException: Unknown value type to convert
at lotus.domino.local.NotesBase.NPropGetVector(Native Method)
at lotus.domino.local.NotesBase.PropGetVector(Unknown Source)
at lotus.domino.local.Item.getValues(Unknown Source)
The only think which returned something useful was item.getValueString(). This seemed to return the filename at the start null terminated, followed by “a lot of junk”.
I could write a hack to get this out, but I am wondering am I missing something obvious? Is there a bug in getValues() not parsing this value correctly?
Thanks in advance for any advice.
Cheers,
David