Why does this code work on normal document text, but if you select text inside a table it causes an error: “End of content node doesn’t have the proper start node.”
Sub Main
viewCursor = ThisComponent.CurrentController.getViewCursor()
textCursor = ThisComponent.Text.createTextCursorByRange(viewCursor)
End Sub
How are you supposed to have a macro that works inside a table?
UPDATE:
OK, let me be more clear. I have a macro that takes the selected text and modifies it. It works fine when running on a normal paragraph, but I get that error when I try to run the macro inside a table or frame. Clearly I need to use a different method in order to get the selected text and the cursor position inside of a table. So what is the code to do that? Thanks.