How to "flatten" a bulleted or numbered paragraph?

J

jogme

When I convert a Word document to a text-only format, all the bulleted
and numbered paragraphs are "flattened", ie, become paragraphs
beginning with the actual bullet (or number or other string) followed
by a tab character.

I tried to accomplish this "flattening" in Word, but the "Bulleted and
Numbered Paragraph" options only allow to completely remove the prefix
string.

I would like to know if there is a way to tell Word to change a
bulleted or numbered paragraph to a paragraph beginning with the
respective bullet (or number), followed by a tab character.

The "Paste special -> Styled text" command works, but removes the
styles of the pasted text. I would love a method which preserves
paragraph and character styles.


Greetings,

João Carlos de Pinho
São Paulo / Brazil
 
D

Daiya Mitchell

I think this will do what you want. It appears to work on bullets as well.
I'm not sure it will preserve the styles, exactly, but it should keep the
formatting. Test it on a copy to make sure it is right for you first.

To transform autonumbering to real numbers in the text:

WARNING: this cannot be undone, it will smash your autonumbering throughout
the entire document and turn it into static text, you should do this *on a
copy* in case you ever want to edit those numbers again.

Hit Tools | Macros, Visual Basic Editor to open the VBA editing window, then
cmd-G to open the
Immediate window. In that window, type or paste this command:

ActiveDocument.ConvertNumbersToText

And hit Enter.

Nothing will seem to happen, but when you use Word | Close and Return to MS
Word to get back to your document, the numbers should be selectable and
editable.

It's probably also possible to tweak this so that it only runs on a
selection, but I don't know how. I would advise not having other documents
open while doing this, in case the Active Document turns out to be a
different one than you thought.
 
J

jogme

Thank you very much, Daiya.

Your suggestion got the work done.

Concerning the "active document vs selected text" issue, I used your
tip as a starting point for a research. I googled the term
"ConvertNumbersToText" and I eventually found a snippet code that makes
the conversion only in the selected text. The code is as follows:

Selection.Range.ListFormat.ConvertNumbersToText


However, the conversion, both in the Selection.Range and in the
Active.Document, is not perfect. For some reason, Word changes the
leading (space between lines) of the converted text. But this is a
minor flaw, which, in my particular need, doesn't pose a big problem.


Again, thank you very much for your prompt and effective help.


João Carlos de Pinho
São Paulo / Brazil
 
D

Daiya Mitchell

Concerning the "active document vs selected text" issue, I used your
tip as a starting point for a research. I googled the term
"ConvertNumbersToText" and I eventually found a snippet code that makes
the conversion only in the selected text. The code is as follows:

Selection.Range.ListFormat.ConvertNumbersToText

Thanks for that, very handy.
However, the conversion, both in the Selection.Range and in the
Active.Document, is not perfect. For some reason, Word changes the
leading (space between lines) of the converted text. But this is a
minor flaw, which, in my particular need, doesn't pose a big problem.

Huh. I didn't notice this, but my quick test was just on single-spaced dummy
text.

If you are doing this a lot, you could make it a real macro instead of
using the immediate window, and then it would probably be fairly easy to
include a line that set the proper spacing as well, though again, I'm not
quite sure what that would look like.
Again, thank you very much for your prompt and effective help.

Glad to.

DM
 
P

Paul Berkowitz

Hit Tools | Macros, Visual Basic Editor to open the VBA editing window, then
cmd-G to open the
Immediate window. In that window, type or paste this command:

ActiveDocument.ConvertNumbersToText

And hit Enter.

Nothing will seem to happen, but when you use Word | Close and Return to MS
Word to get back to your document, the numbers should be selectable and
editable.

It's probably also possible to tweak this so that it only runs on a
selection, but I don't know how.
Selection.ConvertNumbersToText

I would advise not having other documents
open while doing this, in case the Active Document turns out to be a
different one than you thought.

ActiveDocument is _always_ the document in the front.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
P

Paul Berkowitz

Thank you very much, Daiya.

Your suggestion got the work done.

Concerning the "active document vs selected text" issue, I used your
tip as a starting point for a research. I googled the term
"ConvertNumbersToText" and I eventually found a snippet code that makes
the conversion only in the selected text. The code is as follows:

Selection.Range.ListFormat.ConvertNumbersToText

That's better, yes.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
D

Daiya Mitchell

It's probably also possible to tweak this so that it only runs on a
Selection.ConvertNumbersToText

Thanks also.
ActiveDocument is _always_ the document in the front.

Well, yeah, but what if an accidental mouseclick brought a different doc to
the front and you didn't notice? That's what I was thinking of, not code
gone rogue.

DM
 

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