def getWords():
doc = XSCRIPTCONTEXT.getDocument()
parentwin = doc.CurrentController.Frame.ContainerWindow
text = doc.Text
MessageBox(parentwin, text.getString(), "Document")
wordcursor = text.createTextCursor()
while 1:
wordcursor.gotoStartOfWord(False);
wordcursor.gotoEndOfWord(True);
MessageBox(parentwin, wordcursor.getString(), "Word")
if (wordcursor.gotoNextWord(False) == False):
break;
|