Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word VBA Converting Outline Level Format from Number to Letter

Status
Not open for further replies.

BeckyMc

Technical User
Jun 19, 2001
51
US
I have one other question about VBA code mostly for a word document. I'm outputting a recordset from Access to Word and that's OK. Then I select a range between 2 bookmarks as I need to see that section of paragraphs to to the 2nd outline level which also works OK. However by default the 2nd outline level uses numbers instead of lower case letters.

I was trying to see if I could change thar for one range of paragraphs rather than apply a style to a whole document. Right now this is what my code is doing:

Code:
        WordObj.ActiveDocument.Range(WordObj.ActiveDocument.Bookmarks("MMPBodyStart").Range.Start, WordObj.ActiveDocument.Bookmarks("MMPBodyEnd").Range.End).Select

     For Each P In WordObj.Selection.Paragraphs
        If Left(P.Range.Text, 10) = "Failure to" Then
            P.Format.LeftIndent = InchesToPoints(1.25)
            P.Range.SetListLevel Level:=2
            P.Range.ListFormat.ApplyNumberDefault
        End If
    Next

This all works fine but for these paragraphs only instead of

1)
2)

etc

I was hoping to get

a)
b)

etc

Any suggestions without having to create a whole style?
 
I'd use the ListFormat.ApplyListTemplate method instead of ApplyNumberDefault.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top