//OK - now we need a search query
SearchDescriptor searchDescriptor = new SearchDescriptor("NOA");
searchDescriptor.setIsCaseSensitive(true);
//Perform the search ...
ISearchResult searchResult = textDocument.getSearchService().findFirst(searchDescriptor);
if(!searchResult.isEmpty()) {
//...and now select the result
ITextRange[] textRanges = searchResult.getTextRanges();
textDocument.setSelection(new TextRangeSelection(textRanges[0]));
}
}
catch (OfficeApplicationException exception) {
exception.printStackTrace();