Hello forum,
I would like to set parameters by macro for outline numbering.
If I inspect a document with MRI, I found NumberingRules property.
But this interface is in read only.
How can I proceed?
Sub CheckOutLine()
Dim i%, j%
Dim oRules
Dim oRule()
Dim oProp
oRules = ThisComponent.getChapterNumberingRules()
For i = 0 To oRules.getCount() - 1
oRule() = oRules.getByIndex(i)
REM I do not set the following:
REM Adjust, LeftMargin,
REM SymbolTextDistance, FirstLineOffset
For j = LBound(oRule()) To Ubound(oRule())
REM oProp is only a copy of the property.
REM You must assign the property back into the array.
oProp = oRule(j)
Select Case oProp.Name
Case "HeadingStyleName"
'oProp.Value = sNames(i)
Case "NumberingType"
'oProp.Value = com.sun.star.style.NumberingType.ARABIC
Case "ParentNumbering"
'oProp.Value = i + 1
Case "Prefix"
oProp.Value = "Lesson"
Case "Suffix"
oProp.Value = "Study Notes"
Case "StartWith"
oProp.Value = 8
End Select
oRule(j) = oProp
Next
oRules.replaceByIndex(i, oRule())
Next
End Sub
Return to OpenOffice Basic, Python, BeanShell, JavaScript
Users browsing this forum: No registered users and 3 guests