I have make some macro using the recorder to change text colors in the current cell of a text table.
What is working (only 2 samples of what I use) :
1°) Changing the text from automatic character color with no highlighting (no fill) with no background color (no fill)
to white character color with no highlighting (no fill) and with grey 20% background color ( and the reverse ).
2°) Changing the text from automatic character color with no highlighting (no fill) with no background color (no fill)
to white character color with green 7 highlighting and with no background color (no fill) (and the reverse).
What I would like to add :
Changing the text from automatic character color with no highlighting (no fill) with no background color (no fill)
to white character color with green 7 highlighting and light magenta background color (and the reverse).
Using the recorder what I get is a text in white character color with green 7 highlighting and light magenta background color with two horizontal stripes on both sides of the text. As if the cell was not completely selected. Just the text area.
I have tried to write myself my macro but it did not work. I get errors because I am mixing methods from calc and writer
Code: Select all
ThisComponent.CurrentSelection.getRangeAddress
I have no idea how to select completly the currrent cell as I can do with the mouse cursor ( not only the text region ).
I suppose that I must fix the background color of the entire cell and then fix the background color of the text region and then the highlight color and finish with the character color.
By the way how can I get the coordinate of the current cell.
Thank you for helping me.