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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -