Macros/Writer/ba001/nl
Appearance
TDF LibreOffice Document Liberation Project Blogs gemeenschap Weblate Nextcloud Redmine Ask LibreOffice Doneren
Beschrijving
Voeg een tekenreeks in op de cursorpositie in het huidige document.
Basic code
Sub insert_in_cursor_position()
data = "Hello World with Basic"
REM Huidige document
doc = ThisComponent
REM De huidige selectie retourneert altijd een bereik en loopt tot het eind
text = doc.CurrentSelection.getByIndex(0).End
REM Gegevens schrijven
text.String = data
End Sub
References to API
Regel | Link |
---|---|
5 | com.sun.star.text.TextDocument |
8, 11 | com.sun.star.text.XTextRange |