Find all list items via VBA -



Find all list items via VBA -

i'm trying set document publishing website, need add together html tags before , after list items. however, it's not picking list items up. can please help? thanks.

sub format_list() dim para paragraph dim is_list_item boolean is_list_item = false each para in activedocument.paragraphs if para.range.listformat.listtype = wdlisttype.wdlistbullet is_list_item = true para.range.insertbefore "<li>" para.range.insertafter "</li>" end if next end sub

try using next instead of para.range.insertafter "</li>"

para.range.select selection.endkey unit:=wdline selection.typetext text:="</li>"

list vba ms-word word-2007

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -