Restart List Numbering for Word Doc from Excel VBA -


i have spreadsheet has matrix, text in first column gets implemented built word document if there "x" in cell in same row line of text. this, make lists headings, having trouble restarting list after every heading.

below code attempts restart list. returns no errors until last line item before end if (list galleries). can help?

                if range("a" & x - 1).value = "heading"                         listgalleries(wdnumbergallery).listtemplates(1).listlevels(1)                             .numberformat = "(%1)"                             .trailingcharacter = wdtrailingtab                             .numberstyle = wdlistnumberstylelowercaseletter                             .numberposition = centimeterstopoints(2)                             .alignment = wdlistlevelalignleft                             .textposition = centimeterstopoints(2.63)                             .tabposition = wdundefined                             .resetonhigher = 0                             .startat = 1                             .font                                 .bold = wdundefined                                 .italic = wdundefined                                 .strikethrough = wdundefined                                 .subscript = wdundefined                                 .superscript = wdundefined                                 .shadow = wdundefined                                 .outline = wdundefined                                 .emboss = wdundefined                                 .engrave = wdundefined                                 .allcaps = wdundefined                                 .hidden = wdundefined                                 .underline = wdundefined                                 .color = wdcolorblack                                 .size = wdundefined                                 .animation = wdundefined                                 .doublestrikethrough = wdundefined                                 .name = ""                             end                             .linkedstyle = "sowsublist"                         end                         listgalleries(wdnumbergallery).listtemplates(1).name = ""                         objword.activedocument.characters.last.select                         selection.range.listformat.applylisttemplatewithlevel listtemplate:= _                             listgalleries(wdnumbergallery).listtemplates(1), continuepreviouslist:= _                             true, applyto:=wdlistapplytowholelist, defaultlistbehavior:= _                             wdword10listbehavior                 end if                 objword.selection.typeparagraph 'move next line 


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -