EffectParameters.Relative Property (PowerPoint)
Determines whether to set the motion position relative to the position of the shape. Read/write.
Syntax
expression .Relative
expression A variable that represents a EffectParameters object.
Return Value
MsoTriState
Remarks
This property is only used in conjunction with motion paths.
The value of the Relative property can be one of these MsoTriState constants.
Constant |
Description |
---|---|
msoFalse |
The default. The motion path is absolute. |
msoTrue |
The motion path is relative. |
Example
The following example adds a shape, adds an animated motion path to the shape, and reports on its motion path relativity.
Sub AddShapeSetAnimPath()
Dim effDiamond As Effect
Dim shpCube As Shape
Set shpCube = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeCube, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effDiamond = ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpCube, effectId:=msoAnimEffectPathDiamond)
effDiamond.Timing.Duration = 3
MsgBox "Is motion path relative or absolute: " & _
effDiamond.EffectParameters.Relative & vbCrLf & _
"0 = Relative, -1 = Absolute"
End Sub