I'm trying to write a basic function to check if the text in a cell is bolded, but I keep getting the mentioned runtime error on the second line. I've looked up various documentations and tried other permutations of this code including declaring V as a variant, object etc... I'm still not sure what's wrong.
Function IsBold(V)
If V.CharWeight = com.sun.star.awt.FontWeight.BOLD Then
IsBold = "TRUE"
Else
IsBold = "FALSE"
End If
End Function
oVC = ThisComponent.getCurrentController().getViewCursor(); MsgBox IsBold(oVC).