View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Ari Bendicoff Ari Bendicoff is offline
external usenet poster
 
Posts: 4
Default Any way to limit ConvertNumbersToText

Klaus,

Thanks so much for your help, sadly my document has all the worst case
scenarios you described. 1) All the lists are of the same number
type. 2) The table and non-tables numbers are interspersed so no
range selector. 3) I tried a macro and yes, since the numbering in
the tables is continuous, as soon as it changed one paragraph, all the
numbering was thrown off.

Thanks again for your help!


On May 5, 10:27*am, "Klaus Linke" wrote:
"Ari Bendicoff" wrote:
I have a document with lots of different instances of auto-numbering.
I want to hardcode only the auto numbering that is contained in
tables. *Is there any way to constrain the ConvertNumbersToText
command to only include or exclude certain items? *For instance I know
that the command ActiveDocument.Tables.ConvertNumbersToText is
invalid, but is there any way to make that idea work?


Hi Ari,

There are two "built-in" ways to restrict the numbers that get converted.

.ConvertNumbersToText can take an argument,
.ConvertNumbersToText(NumberType)
which allows you to specify whether paragraph auto-numbering or LISTNUM
fields or both are converted.

That's not terribly helpful though, since most times you have only one of
the two anyway.

Then you can only convert one specific list...
Say to convert only the list that the cursor is in:
Selection.Range.ListFormat.ConvertNumbersToText

A list in Word covers the whole document, though, and some of it may be
inside a table and other list items may not.

The only safe way to do what you want to do would be to write your own macro
that loops through all auto-numbered paragraphs, and replaces the list
string with hard text, if the paragraph is in a table.
That's a hard job though, if you have to make sure that this doesn't mess up
the numbers (possibly outside a table) that belong to the same list, further
down.

Regards,
Klaus