How to convert numbering & headings to string variable

K

krklka

Hi,
I'm writing extraction tool for specificactions written in word
document under strict rules . Then I need to create some kind of TOC
including chapter numbers but consisting also pointers to headings to
be able to link the data by special manner in Excel later on. Till now
no sucess with :
1) .ConvertToText method
2) . Copy -> Paste special (as text )
3 ) wrd.Selection.Range.ListFormat.ListString ( here the heading is
selected and function returns "" )

I can select each heading ( used for copy/paste ) . Only indent is
possible to get:

Selection.Range.ListFormat.ListIndent

so I'm thinking about to store indent and later on to generate new
numbering ( based on indent & order) coresponding with numbering in
word doc.

Any other ideas ?

Regards,
K.
 
J

Jezebel

The ListString property works in general: if it's returning an empty string,
then your problem lies elsewhere. Are you sure you're referring to the right
paragraph? As a test, auto-number the first paragraph of the document and
try this in the Immediate window --

? ActiveDocument.Paragraphs(1).Range.ListFormat.ListString
 

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