The first is how to create a new style based upon an existing style using vba and not using the selection object.
The following code creates a new style based on the paragraph style of the selection.
Code: Select all
Private Sub CreateStyle()
ActiveDocument.Styles.Add Name:="MyStyle", Type:=wdStyleTypeParagraph
End Sub
The second part of the question is how to make it a paragraph style.
I want it to be based on the Normal style or the Body Text style and both of these are linked styles. However, the code creates a linked style even when the base style is not.