I have to write a macro that highlights specific numbers (to set the background color to yellow).
I have already written a macro that finds these numbers using object Cursor but i don't know how to change the background color.
Dim Cursor As Object
Dim Proceed As Boolean
Cursor = ThisComponent.Text.createTextCursor()
Cursor.gotoStart(False)
Do
Cursor.gotoEndOfWord(True)
'some If statements that check if the number is correct
'Cursor.CharEmphasis = com.sun.star.text.FontEmphasis.DOT_BELOW
Proceed = Cursor.gotoNextWord(False)
Loop While Proceed
I found a function that emphasises the text with dots below the text. Is there something similar for highlighting the text?