Hello Friends,
How Can i apply macro code for char or font relating formatting to the CellRange(“B2:E5”) ? When i run the macro, it could not apply that formatting in the Range(“B2:E5”).
Here, is the Code
Sub Char_Formatting
Dim oRange as Object
oRange = ThisComponent.CurrentController.ActiveSheet.getCellRangeByName("B2:E5")
Dim charProp As Object
charProp = createUnoService("com.sun.star.style.CharacterProperties")
With charProp
.CharWeight = 175
.CharColor = RGB(0,0,255)
.CharFontName = "Calibri"
.CharFontNameAsian = "Calibri"
.CharHeight = 14
.CharStrikeout = 2
End With
oRange = charProp
Here is the Source File
Char_Properties.ods (11.8 KB)
Please , help me Where i made the mistake ?