Useful codes for special characters in Open(Libre) office macros

Last updated:

bullet point


regular whitespace


example: simulate the prepending of a bullet point to every paragraph whose style is called Heading 2

Sub Teste2
    oEnum = ThisComponent.Text.createEnumeration()
    Do While oEnum.hasMoreElements()
        oPar = oEnum.nextElement()
        If oPar.supportsService("") Then
            If oPar.ParaStyleName = "Heading 2" Then
                dim str
                str = oPar.getString()
                str  = CHR$(8226) & str
                oPar.String = CHR$(09) & str
            End If
        End If
End Sub

Dialogue & Discussion