Style

S

Senad Isanovic

Before I use a style - how do I check that the style exists..? (without
using On Error goto...)

Selection.Style = ActiveDocument.Styles("widPunktlista")
 
T

Tony Jollans

Without error-trapping you must walk the collection ..

For Each sty In ActiveDocument.Styles
If sty.NameLocal = "widPunktlista" then
' style exists
exit for
endif
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top