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