Site Administration Page 5 - Connect Lotus Domino Server through Standalone Application with CORBA |
Deleting attachments from a file isn't as easy as we think because the attachments could go with body text, and an email could have more than one body. Because of that, we need to retrieve all Body fields, save them to a buffer, (only text), remove it, and then recreate only with the buffer information. String bod = new String(); oDocument.save(); As you can see in the first part of the algorithm, what we do is save all text information into a String object and we remove the body section. It would be better use StringBuffer. Then we create a new body, and we append all the text previously kept. Linking Documents Linking documents to other documents is a very important feature because you can divide one document in multiple documents, with all documents linked, so when you consult, you can navigate through documents. RichTextItem body = oDocument.createRichTextItem("Body"); oDocument.save(); The code is so simple; we create a RichTextItem object, first we append a text, and then we append a document. What we would see is a document icon, and when we push it, we will jump to the document we have already appended.
blog comments powered by Disqus |