Word 2003 Macro to remove numbering

D

Diamonds_Mine

Working with documents that are received from others that have a combination
of manual and automatic numbering -- can someone provide me with macro code
to locate automatic numbering in a documenet and remove it. Thank you so much
 
D

Daiya Mitchell

Do you want to delete it, so that the text is no longer numbered, or convert
the automatic numbers to hard numbering as regular text?
 
G

Greg

Depends if you want to remove just the number, remove the number and
corresponding text, or convert the numbering to manual numbering. I am
assuming that you want to convert to manual numbering. Something like:

Sub ScratchMacro()
Dim oList As List
For Each oList In ActiveDocument.Lists
If oList.Range.ListFormat.ListType <> wdListBullet Then
oList.ConvertNumbersToText
End If
Next

'For Each oList In ActiveDocument.Lists
' If oList.Range.ListFormat.ListType <> wdListBullet Then
' oList.RemoveNumbers
' End If
'Next

'For Each oList In ActiveDocument.Lists
' If oList.Range.ListFormat.ListType <> wdListBullet Then
' oList.Range.Delete
' End If
'Next

End Sub

If it is one of the other options then adapt the code accordingly.
 

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