LO macro: code to test for whether text is in bullet form?

Trying for a workaround related to yesterday’s question…

I have a bulleted list, and I want the macro to perform an action (AutoText) on the first word of each bullet point and then stop when it gets to the end of the list. One idea I had for this is to test whether the word is part of a bullet or not. Logically, it would be something like:

If [word is part of a bullet point] Then
run autotext and go to next paragraph
Else
Stop

Ideas?

Thanks!

So I’m most of the way there on this in case anyone else is interested.

The relevant code looks like:

sub Example
rem---get the list style 
dim Stylez as String
Stylez = ThisComponent.CurrentController.ViewCursor.NumberingStyleName
rem-----long number = standard bullet for my documents
rem--- checks for bullet type; stops macro if it's not a bullet '

If Stylez = "69642466802644995571" Then

dispatcher.executeDispatch(document, ".uno:ExpandGlossary", "", 0, Array())

dispatcher.executeDispatch(document, ".uno:GoToNextPara", "", 0, Array())
Else 

Stop

End If

End Sub

some edit for proper code-formatting

Cool, thanks! couldn’t quite figure out how to get the rest in the codebox