Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.ApplyStyle


Shape.ApplyStyle

Sub ApplyStyle(StyleName As String)

Description

Member of Shape

The ApplyStyle method applies a text or graphic style to a shape.

Parameter
Description
StyleName
Specifies the style by name

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.