AddEffect

AddEffect(IShape, EffectType, EffectSubtype, EffectTriggerType)

Add new effect to the end of sequence.

public IEffect AddEffect(IShape shape, EffectType effectType, EffectSubtype subtype, 
    EffectTriggerType triggerType)
ParameterTypeDescription
shapeIShapeShape object IShape for adding an effect
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

See Also


AddEffect(IParagraph, EffectType, EffectSubtype, EffectTriggerType)

Add new animation effect for paragraph to the end of sequence.

public IEffect AddEffect(IParagraph paragraph, EffectType effectType, EffectSubtype subtype, 
    EffectTriggerType triggerType)
ParameterTypeDescription
paragraphIParagraphParagraph object IParagraph
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

Examples

[C#]
using(Presentation presentation = new Presentation(path + "input.pptx"))
{        
   // select paragraph to add effect
   IAutoShape autoShape = (IAutoShape)presentation.Slides[0].Shapes[0];
   IParagraph paragraph = autoShape.TextFrame.Paragraphs[0];

   // add Fly animation effect to selected paragraph
   IEffect effect = presentation.Slides[0].Timeline.MainSequence.AddEffect(
   paragraph, EffectType.Fly, EffectSubtype.Left, EffectTriggerType.OnClick);
}

See Also


AddEffect(IChart, EffectChartMajorGroupingType, int, EffectType, EffectSubtype, EffectTriggerType)

Adds the new chart animation effect for category or series to the end of sequence.

public IEffect AddEffect(IChart chart, EffectChartMajorGroupingType type, int index, 
    EffectType effectType, EffectSubtype subtype, EffectTriggerType triggerType)
ParameterTypeDescription
chartIChartChart object IChart
typeEffectChartMajorGroupingTypeType of an animation effect EffectChartMinorGroupingType
indexInt32Index Int32
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

See Also


AddEffect(IChart, EffectChartMinorGroupingType, int, int, EffectType, EffectSubtype, EffectTriggerType)

Adds the new chart animation effect for elements in category or series to the end of sequence.

public IEffect AddEffect(IChart chart, EffectChartMinorGroupingType type, int seriesIndex, 
    int categoriesIndex, EffectType effectType, EffectSubtype subtype, 
    EffectTriggerType triggerType)
ParameterTypeDescription
chartIChartChart object IChart
typeEffectChartMinorGroupingTypeType of an animation effect EffectChartMinorGroupingType
seriesIndexInt32Index of chart series Int32
categoriesIndexInt32Index of category Int32
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

See Also