Select 具有特定编号样式的列表

Select lists with specific numbering style

当使用以下条件时

Set r = ActiveDocument.Paragraphs(i).range
If r.ListFormat.ListTemplate.ListLevels(1).NumberStyle = wdListNumberStyleLowercaseRoman Then

我明白了

Run-Time error '91': Object variable or With block variable not set

我设法使用 AscW 检查为具有特定项目符号的列表创建了一个类似的宏,但在这里已经浪费了一整天,仍然没有工作结果。

我做错了什么以及如何做对?

是否可以使用 this table 中的值而不是 wd-names?对于 wdListNumberStyleLowercaseRoman,根据 table.

将为“2”

使用 class ListParagraphs 而不是 Paragraphs 将使其适用于 wd-names 及其值。