以下可视化基本代码是否具有等效的python-docx?它是什么?指向适当的文档或示例代码的指针也将非常有用。
With ListGalleries(wdOutlineNumberGallery).ListTemplates(1).ListLevels(2)
.NumberFormat = "%1.%2"
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleLegal
.NumberPosition = InchesToPoints(0)
.Alignment = wdListLevelAlignLeft
.TextPosition = InchesToPoints(0.5)
.TabPosition = wdUndefined
.ResetOnHigher = 1
.StartAt = 1
With .Font
.Bold = False
.Italic = False
.StrikeThrough = False
.Subscript = False
.Superscript = False
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = False
.Hidden = False
.Underline = wdUnderlineNone
.Color = wdUndefined
.Size = 10.5
.Animation = wdUndefined
.DoubleStrikeThrough = False
.Name = "Times New Roman"
End With
.LinkedStyle = "L2"
End With
目标是能够为段落分配样式并带有适当的链接编号,以便我可以将样式分配给段落并自动获得编号良好的列表。