Object Model Reference : Classes : S : Shape : Methods : Shape.ApplyStyle |
Sub ApplyStyle(StyleName As String)
Member of Shape
The ApplyStyle method applies a text or graphic style to a shape.
The following VBA example creates an ellipse and fills it. It then applies the default graphic style (a hairline outline and no fill) to the ellipse.
Sub Test() |
Dim s1 As Shape |
Set s1 = ActiveLayer.CreateEllipse(0, 0, 2, 2) |
s1.Fill.ApplyUniformFill CreateRGBColor(255, 0, 0) |
s1.ApplyStyle "Default Graphic" |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.