I am trying to automatically format my List styles in Word.
But, being that I'm very new to VBA and only need VBA for this one project, I'm doing a whole lot of trial-and-error to get this to work.

I can't quite get the number formats for the ListLevels. I want my Outlined Numbered list to use the following format

SAMPLE 1
1 <my title>
1.1 <my sub title>
1.2 <my sub title>
2 <my title>
2.1 <my sub title>
2.2 <my sub title>
2.3 <my sub title>
3 <my title>
(etc...)

And all I get is:

SAMPLE 2
1 <my title>
1.1 <my sub title>
1.1 <my sub title>
2 <my title>
2.2 <my sub title>
2.2 <my sub title>
2.2 <my sub title>
3 <my title>
(etc...)


(Later, I'll ask how I can specify a paragraph to have List Level 2. I haven't been able to autmoate that either.)

A long while back (when talking about ListGalleries) si_the_geek said "Hmmm, I've never seen ListGalleries before..." which makes me wonder what other ways there are to do this.

Anyway, here is my cod that formats the ListGalleries (the wrong way).

VB Code:
  1. m = 1
  2.     Do While (m < 5)
  3.         With objWord.ListGalleries(wdOutlineNumberGallery).ListTemplates(3).ListLevels(m)
  4.             If (m = 1) Then
  5.                 .NumberFormat = "%1"
  6.                 .StartAt = 1
  7.                 .ResetOnHigher = False
  8.             ElseIf (m = 2) Then
  9.                 .NumberFormat = "%1.%1"
  10.                 .StartAt = 1
  11.                 .ResetOnHigher = False
  12.             ElseIf (m = 3) Then
  13.                 .NumberFormat = "%1.%1.%1"
  14.                 .ResetOnHigher = True
  15.             ElseIf (m = 4) Then
  16.                 .NumberFormat = "%1.%1.%1.%1"
  17.                 .ResetOnHigher = True
  18.             End If
  19.            
  20.             .TrailingCharacter = wdTrailingTab
  21.             .NumberStyle = wdListNumberStyleArabic
  22.             .Alignment = wdListLevelAlignLeft
  23.             '.ResetOnHigher = 0
  24.            
  25.         End With
  26.         m = m + 1
  27.     Loop

Maybe my code to format the title
VB Code:
  1. .Range.ListFormat.ApplyNumberDefault  'e.g. 1.
is the problem.

Melissa