How to show sublevels in numbering

dear developers,

i hope that any one can help me
I want to insert a numbered lis with subitems as follow examble:

  1. First level item
    1.1 subitem one
    1.2 subitem two

The code bellow do it, but it do not show the eumeration of the subitems as 1.1 1.2 etc

dim args2(0) as new com.sun.star.beans.PropertyValue

rem ----------------------------------------------------------------------
rem ----------------------------------------------------------------------

args2(0).Name = “On”
args2(0).Value = true
dispatcher.executeDispatch(document, “.uno:DefaultNumbering”, “”, 0, args2())

rem ----------------------------------------------------------------------
rem ----------------------------------------------------------------------
args2(0).Name = “Text”
args2(0).Value = “First leve”
dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args2())
dispatcher.executeDispatch(document, “.uno:InsertPara”, “”, 0, Array())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, “.uno:DecrementSubLevels”, “”, 0, Array())

args2(0).Name = “Text”
args2(0).Value = “subitem one”
dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args2())
dispatcher.executeDispatch(document, “.uno:InsertPara”, “”, 0, Array())

args2(0).Name = “Text”
args2(0).Value = “subitem two”
dispatcher.executeDispatch(document, “.uno:InsertText”, “”, 0, args2())
dispatcher.executeDispatch(document, “.uno:InsertPara”, “”, 0, Array())

dispatcher.executeDispatch(document, “.uno:IncrementSubLevels”, “”, 0, Array())

rem ----------------------------------------------------------------------
rem ----------------------------------------------------------------------

args2(0).Name = “On”
args2(0).Value = false
dispatcher.executeDispatch(document, “.uno:DefaultNumbering”, “”, 0, args2())

Just out of curiosity, why do you want a macro for this? Standard settings are readily available for it. So, if your only goal is to type list items with this kind of numbering, there is no reason to go with the fuss of macros.

Also, as is usual, edit your question (= modify it, don’t add a comment) to mention OS name, LO version and save format. Give us an idea about your familiarity with styles. How do you create your numbered lists: with toolbar buttons? with list styles? other?

this is just an example of how we use the commands in our application