Finding Current Paragraph Number
Posted on 2001-07-16
I'm looking for a VBA only solution, this needs to be incorporated into existing code. Either an encapsulated function to return the code or a snippet that can be included into existing is fine.
The problem is I need to know my current insertion point's paragraph number, to deal with some formatting. Why I need it is not the best reason in the world, but alternatives are nastier. What I can't find though, is a way to find my current paragraph number location.
Locating an index in selection.paragraphs or trying to match selection.paragraph against the indexed collection. You can only pull the collection out of the selection.
Using selection.information, for the way you'd typically find the page number/row count/yadayada, they didn't include the paragraph # index within this.
Coming at it through a count using a bookmark to store orig location, then a selection extend and counting paragraphs, is starting to appear to be the only way out of it, and I can build this already. Does anyone else have a direct method to pull the information or am I building a workaround?
Thanks in advance.