ListLevel.NumberFormat 屬性 (Word)

會傳回或設定指定之的清單層次的數字格式。 讀取/寫入的 String。

語法

expression.NumberFormat

運算式 傳回 'ListLevel' 物件的運算式。

註解

後面的任何數字 1 至 9 的百分比符號 (%) 代表各自的清單階層的數字樣式。 例如,如果您想要設為"文章 I 檔案 」 的第一層級的格式,"文章 ii 部分"等, 與 NumberFormat 屬性的字串是"文章 %1"和 NumberStyle 屬性會設為 清單層次 。

如果將 NumberStyle 屬性設為 wdListNumberStyleBullet , NumberFormat 屬性的字串只能包含一個字元。

範例

此範例會建立清單範本,將每個層次縮排,並以阿拉伯數字和句點來設定層次的格式。 然後,新的清單範本會套用至選取範圍。

Set LT = ActiveDocument.ListTemplates.Add(OutlineNumbered:=True) 
For x = 1 To 9 
 With LT.ListLevels(x) 
 .NumberStyle = wdListNumberStyleArabic 
 .NumberPosition = InchesToPoints(0.25 * (x - 1)) 
 .TextPosition = InchesToPoints(0.25 * x) 
 .NumberFormat = "%" & x & "." 
 End With 
Next x 
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=LT

另請參閱

ListLevel 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。