Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Returning Paragraph Number (VBA/Word/2003)

    Hello All
    I have searched the Lounge, Googled, and searched my memory (this last item is usually fruitless), for a snippet of code which will return the paragraph number of a given paragraph (Heading outline with automatic numbering). I am certain that I have used it in the past, but have been unable to locate it today.

    Example I would expect the code to return 2.3.5 from the following level 3 heading.
    2.3.5 Range to target

    Any guidance will be deeply appreciated.
    Regards
    Don

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Returning Paragraph Number (VBA/Word/2003)

    For the current selection, Selection.Range.ListFormat.ListString will return the number of the first paragraph within the selection. For a range object named rng, use rng.ListFormat.ListString.

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Returning Paragraph Number (VBA/Word/2003)

    Thank you Hans

    You're a lifesaver. <img src=/S/hailpraise.gif border=0 alt=hailpraise width=27 height=22>
    Regards
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •