Share via


PictureEffects.Insert Method (Office)

Inserts a Picture Effect in a chain of composite effects.

Version Information

Version Added: Office 2010

Syntax

expression .Insert(EffectType, Position)

expression An expression that returns a PictureEffects object.

Parameters

Name

Required/Optional

Data Type

Description

EffectType

Required

MsoPictureEffectType

An enumeration specifying the type of Picture Effect.

Position

Optional

Integer

The position of the effect in the composite chain of Picture Effects.

Return Value

PictureEffect

Remarks

Picture Effects are processed as a chain composed of individual items which are applied in sequence to create the final composited image. An Effects chain will allow an effect to be added to the chain, reordered, or removed from the chain.

Example

The following code sets several Picture Effect fill properties on a shape in a Microsoft PowerPoint slide.

Sub PictureEffectSample() 
' Setup a slide with one picture shape. 
With ActivePresentation.Slides(1).Shapes(1).Fill.PictureEffects 
 
 ' Insert a 150% Saturation effect. 
 .Insert(msoEffectSaturation).EffectParameters(1).Value = 1.5 
 
 ' Insert Brightness/Contrast effect and set values to -50% Brightness and +25% Contrast. 
 Dim brightnessContrast As PictureEffect 
 Set brightnessContrast = .Insert(msoEffectBrightnessContrast) 
 brightnessContrast.EffectParameters(1).Value = -0.5 
 brightnessContrast.EffectParameters(2).Value = 0.25 
 
 ' Remove all Picture effects. 
 While .Count > 0 
 .Delete (1) 
 Wend 
 
End With 
End Sub

See Also

Concepts

PictureEffects Object

PictureEffects Object Members