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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -