API Documentation > CorelDRAW > 2025-v26 > OutlineStyles > IVGOutlineStyles
OutlineStyles.AddStyle method
Adds an outline style to the collection based on an existing style
Syntax:
Function AddStyle(ByVal Style As OutlineStyle) As OutlineStyle
Parameters:
Name Type Description
Style
Remarks:
The AddStyle method adds a new outline style to the OutlineStyles collection. The new style is based on an existing style. You can call the Save method after you modify the list of outline styles so that the changes are available the next time you start CorelDRAW.
Examples:
The following VBA example creates a custom outline style based on the second outline in the collection. The changes are then saved.
Sub Test()
Dim stl As OutlineStyle
Set stl = OutlineStyles.AddStyle(OutlineStyles(2))
stl.DashLength(1) = 3
OutlineStyles.Save 
End Sub