Object Model Reference : Classes : E : EffectEnvelope : Methods : EffectEnvelope.CopyFrom |
Sub CopyFrom(Source As EffectEnvelope)
Member of EffectEnvelope
The CopyFrom method copies the properties from one envelope effect to another.
If youve applied an effect to the object since you applied the envelope, you wont be able to copy the envelope.
The following VBA example creates a text object and applies an envelope effect to it. It then creates a group of rectangles and applies an envelope to them, using the same parameters as the texts envelope.
Sub Test() |
Dim s1 As Shape, s2 As Shape, eff As Effect |
Set s1 = ActiveLayer.CreateArtisticText(2.75, 5, "Text") |
With s1.Text.FontProperties |
.Name = "Arial Black" |
.Size = 150 |
End With |
Set eff = s1.CreateEnvelope(3, cdrEnvelopePutty, True) |
Set s2 = ActiveLayer.CreateGridBoxes(0, 0, 3, 3, 8, 8) |
s2.CreateEnvelope(1).Envelope.CopyFrom eff.Envelope |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.