I am currently having alot of trouble finding a way to automatically change List styles across a Word document.

What i mean by this is, you have a document with a Paragraph, then a Numbered list, then a paragraph e.t.c

I want to be able to change the Style of the Numbering used in the numbered list across a document, without affecting the other non list paragraphs.

I have been searching the various methods available in WORD VBA and have so far i can update the entire document with a style as well as change the Font e.t.c, BUT AM UNABLE TO JUST UPDATE THE LISTS!


My Code

VB Code:
  1. dim objWord as Word.Application
  2. Dim NoPages as Long
  3.  
  4. objWord.Selection.MoveEnd 6, Count:=1
  5. NoPages = objWord.Selection.Information(wdNumberOfPagesInDocument)
  6. objWord.Selection.MoveEnd 6, Count:=NoPages
  7.    
  8.     With objWord.Selection
  9.         .Font.Name = "Arial"    
  10.         .Font.Size = 10
  11.         .ParagraphFormat.LineSpacing = 20
  12.         '.ParagraphFormat.Style = "HL LEGAL"
  13.     End With

I then tried to cycle through all the Paragraphs and change the style that way, and then i discovered, even if a line is part of a numbered list, its STYLE can still be NORMAL and not NUMBERED which doesn't help me at all.

VB Code:
  1. For Each Paragraph In objWord.ActiveDocument.Paragraphs
  2.         If Paragraph.Style <> "HL legal" Then
  3.             If Paragraph.Style = "Numbered" Then
  4.                        'change style
  5.             End If
  6.         End If
  7. Next

So what i need is someway to Detect if a line is part of a numbered list and to then change to a different Numbering Style ????

I will be eternally gratefull if anybody has an answer to this as it has been doing my head in !!!!