corpse Posted June 8, 2005 Posted June 8, 2005 I have a large document that is automatically created, however the numbering style isn't getting set right... Here's some of the code I'm trying: Dim oP As Object ' Word.Paragraph Dim x As Object ' Word.ListTemplate x = m_objWordApp.ListGalleries.Item(3).ListTemplates.I tem(4) Try For Each oP In m_objBaseDoc.listparagraphs If oP.Range.ListFormat.ListType = 0 Then ' wdListNoNumbering oP.Range.ListFormat.ApplyOutlineNumberDefault() End If oP.Range.ListFormat.ApplyListTemplate(x, False) Next The line with .ApplyListFormat is causing it to break, it says Type Mismatch on x. I am trying to enforce that the list is set with the 3rd outnline numbering method, so my items are like 1.0, 1.1.1, 1.1.2.3, etc... While at it, I'm also trying to get the lines to indent properly. When I send a vbTab it indents the text, but doesn't indent the list level.. ie: if indenting the second item, it would appear: 2.0 text instead of 1.1 text Quote
Recommended Posts