access the numbering on document with ActiveDocument.Sections(1).r

M

Mike Archer

Hello - I am a newbie.. so this might be an easy question! I want a variable
to have a value that represents an all text version of the activedocument.
This is what I am currently using to assign the value to the variable:

ActiveDocument.Sections(1).Range

That works just fine... except it excludes the numbering from the document.
I really need the numbering to be in the text. How would I do that. It
seems to me that this should maybe do it:

JavaScriptArray = ActiveDocument.Lists(1).Range.ListFormat
or this..
JavaScriptArray = ActiveDocument.StoryRanges(wdMainTextStory)

Or some variation of one of the three. They ALL exclude the numbering. I
have feverishly searched for a solution. Please bail me out!
 
J

Jezebel

You can retrieve the numbering for a given paragraph using
Range.ListFormat.ListString.There's no single property that will give the
'text' of the document as such, with the numbers included. You'll need to
iterate the paragraphs and add the list information if any to each.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top