會傳回或設定指定之的清單層次的數字格式。 讀取/寫入的 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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。