How 2 add new style to collection

S

Sasa

Hi,
I'm programing some macro and I need some hints, how
should I Create a New Collection of styles or (if
possible) how should i Create a New (my own) Style and put
it into Styles Collection. That's becouse I want to make
Cycle For Each to iterate through my own made styles.
Thank you. I appreciate every help.

Sasa Batovanja
 
H

Helmut Weber

Hi Sasa,
I'm not quite sure what you are going to do.
Every new style is added to the styles collection.
What good would it be for to create new styles
programmatically? (Maybe I'm, off the track).
To loop over not built-in-styles you may use
something like that:
Dim oStl As Style
For Each oStl In ActiveDocument.Styles
If Not oStl.BuiltIn Then
MsgBox oStl.NameLocal
End If
Next
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, XP, NT4.0, W98
 

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