Converting autonumbering to text

A

Amir

Hi!

I'm looking for a way to convert all the auto numbered lists
in my document to equivalent characters.


I've gone through the office help and MSDN but it's all
so complicated and I can't find the answer I want..

I'm having a difficulty finding all the different variations
of the auto numbering and dealing with each one.
How can I determine for each paragraph in my document
all the autonumbered lists, then convert this
list to equivalent characters (e.g. "1. " 2. ")?

How can do that also for autonumbered lists
which use letters? ("a. ", "b. " etc.)?
In addition, I wish the solution to take care also in multiple lists.

Maybe this will explain what I wish to do:
I want to convert this:
1.
2.
3.
a.
b.
4.
....

to this (underlines represents spaces)
1._
2._
3._
___a._
___b._
4._

As you can see, in cases where there is a "list inside a list"
I want to have an indent to show that (the lines with 3
underlines ___ show such a case).

The reason I want to do this is that I must
paste Word documents into an emulation program,
which doesn't know to read Word's autonumbering..

Any help will be appreciated!

Kind Regards,
Amir.
 
G

Greg Maxey

Alt+F11 to display theVBA editor. View>Immdiate window. Type in
activedocument.ConvertNumbersToText
press enter
 
A

Amir

Hi!

Thank you very much Greg!

I didn't think this would be such easy..

I have a question about the results of the ConvertNumbersToText command:
After I use this command, it does 2 things which does not suit what I wish
to have:
1. It puts a Tab between the number and the
first character of the text that comes after it, e.g.:
6.{TAB}Beginning of text
(Replace {TAB} With a 'real' Tab: )

Now I want to replace the TAB with an equivalent number of spaces,
because my emulation program does not know how to deal with Tabs.
I'm always using a fixed width font, sized 12 so I can tell the width in
points
of each space(7.2 points), but now how can I know the distance in points
between
the dot after the number to the beginning of the text that
comes after it?
If I know that, I will be able to calculate the number of spaces needed
with:
Round(((TabWidthInPoints / 7.2), 0)
(replace all the Tabs in the document with these spaces)

Or maybe you have a better idea of how I can do this...?

2. In addition, Sometimes I get results like this:
1.
2.
3.
.4
5.
6.
...
Somtimes the dot comes before the number (4 in this example),
and I don't know why..
(It's not like that in the original text before I made it autonumbered,
I've checked that out..)
It's kinda weird because I can't say why it happens only in
part of the cases...
I'm using a right to left language. Can that be the reson for that?
How can prevent it?

Thank you very much again!

Regards,
Amir.
 
G

Greg

Amir,

For the first question, I would just use Find and Replace. Find .^t
and replace with .spaces you want.

I have never seen the second problem and can't offer any ideas.
 

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