I have problem with creating new style into my macro.
When I try it, Word told me that requested member of
collection does not exist. Please tell me where is mistake.
Here is my code:

Dim NewStyle As Style
Set NewStyle = ActiveDocument.Styles("Normal + Courier _
New, 18 pt, Bold, Custom Color(RGB(0,51,255))")

For Each NewStyle In ActiveDocument.Styles
.
.
.
.
Next

Thank you.

Sasa

Re: Adding new style 2 macro by Helmut

Helmut
Wed Sep 17 04:08:47 CDT 2003

Hi Sasa,
the add-Methode is missing!
with activedocument.styles
Set NewStyle = .Add("Standard" & " Courier New")
end with
Of course, this works only once, as you can't add
a style with the same name twice.

Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, W98


Re: Re: Adding new style 2 macro by Sasa

Sasa
Wed Sep 17 06:41:29 CDT 2003

Thanks a lot.
I apreciate it very much.

Sasa