Examples: getUnformattedText method

This agent gets the unformatted text of the Body item in the selected document.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      DocumentCollection dc = agentContext.getUnprocessedDocuments();
      Document doc = dc.getFirstDocument();
      RichTextItem rti = (RichTextItem)doc.getFirstItem("Body");
      String text = rti.getUnformattedText();
      System.out.println(text);

    } catch(Exception e) {
      e.printStackTrace();
    }
  }

}