vba - Clear All styles except Headings with macro -


i want write macro remove style except headers document.
have macro remove styles:

sub clearstyle()     activedocument.select     selection.clearformatting end sub 

how can improve keep headers style?

something should work:

for each p in activedocument.paragraphs   if left(p.style, 7) <> "heading"     p.range.select     selection.clearformatting   end if next 

Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -