# VBA to count last number used in word document



## bradyboyy88 (Jun 6, 2016)

Hi,

I am looking for help to get started on how to count the last number used in a word document via vba. For instance, when have a numbered list in the word doc, what is that last number.

I am building this macro directly into word and cannot find any methods related to this yet.

Thanks


----------



## Macropod (Jun 7, 2016)

Presumably you're after something like:

```
Sub Demo()
With ActiveDocument
  MsgBox .ListParagraphs(.ListParagraphs.Count).Range.ListFormat.ListString
End With
End Sub
```


----------

