Macro to convert 1.0, 1.1, 1.1.1, 1.1.2 in text in Microsoft Word

I just saw a question that Doug responded in 2012 and try to implement it. but it does not work for me, I had hopes for it.

Link Archivo Link Documento

Here's the question I'm refering to:

I'm doing a mass conversion of text documents in RTF format available from one company to another company design. During this process I want to keep intigrate the manually written and enumerations files that are in the document are not likely to affect that is the same format, which is in the example and / or attached file is maintained.

currently being used this macro but does not fully comply with the need that is required.

As Paragraph Dim lp
For Each lp In ActiveDocument.ListParagraphs
        lp.Range.ListFormat.ConvertNumbersToText
Next lp

Enumerations can come as follows:

Example 1:
1.0
1.1
1.1.1
1.1.2
1.1.2.1
Example 2.
1.0
     1.1
          1.1.1
          1.1.2
               1.1.2.1

Example 3.
1 TAB Requirement
TAB 1.1 Requirement
TAB 1.2 Requirement
1.2.1 TAB Subrequirement
TAB (a) TAB Subsubrequirement
TAB (b) TAB Subsubrequirement
TAB (i) TAB Subrequirement
TAB (ii) TAB Subrequirement
TAB (A) TAB Subrequirement
TAB (B) TAB Subrequirement
TAB (1) TAB Subrequirement
TAB (2) TAB Subrequirement

The previous post to which you provided the link deals with the opposite of what you want to do, which can be done by running a macro containing the following code:

ActiveDocument.ConvertNumbersToText

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Dear Doug will send a detailed email to improve my situation, I hope you can read it and I can understand.

it should be emphasized that the macro code above is currently used, but customer need requires changing to a macro that meets the requirements and is reflected in its response to the need for more'm looking for.

Considering its valuable support

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 89 Applies to: