In Impress soll der innerhalb eines viel Text enthaltenen Textfeldes ausgewählte Text umformatiert werden, z.B. andere Schriftart, kursiv, andere Farbe.
Ich kann alle diese Properties LESEN, indem ich z.B. dies tu:
Code: Alles auswählen
oSelection = ThisComponent.getCurrentSelection()
msgbox oSelection.String
msgbox oSelection.CharFontName
msgbox oSelection.CharHeight
msgbox oSelection.CharWeight
msgbox oSelection.CharPosture
msgbox oSelection.CharColor
Code: Alles auswählen
oSelection = ThisComponent.getCurrentSelection()
oCursor = oSelection.getText().createTextCursorByRange(oSelection)
msgbox oCursor.String
msgbox oCursor.CharFontName
msgbox oCursor.CharHeight
msgbox oCursor.CharWeight
msgbox oCursor.CharPosture
msgbox oCursor.CharColor
Code: Alles auswählen
msgbox oSelection.String = "test"
Was mache ich falsch?