Adjustments.Item Property
Returns or sets the adjustment value specified by the Index argument. Read/write.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Default Property Item ( _
Index As Integer _
) As Single
Get
Set
'Usage
Dim instance As Adjustments
Dim Index As Integer
Dim value As Single
value = instance(Index)
instance(Index) = value
float this[
int Index
] { get; set; }
Parameters
- Index
Type: System.Int32
The index number of the adjustment.
Property Value
Type: System.Single
Single
Remarks
For linear adjustments, an adjustment value of 0.0 generally corresponds to the left or top edge of the shape, and a value of 1.0 generally corresponds to the right or bottom edge of the shape. However, adjustments can pass beyond shape boundaries for some shapes. For radial adjustments, an adjustment value of 1.0 corresponds to the width of the shape. For angular adjustments, the adjustment value is specified in degrees. The Item property applies only to shapes that have adjustments.
AutoShapes, connectors, and WordArt objects can have up to eight adjustments.
Examples
This example adds two crosses to myDocument and then sets the value for adjustment one (the only one on this type of AutoShape) on each cross.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
.AddShape(msoShapeCross, 10, 10, 100, 100) _
.Adjustments.Item(1) = 0.4
.AddShape(msoShapeCross, 150, 10, 100, 100) _
.Adjustments.Item(1) = 0.2
End With
This example has the same result as the previous example even though it doesn't explicitly use the Item property.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes
.AddShape(msoShapeCross, 10, 10, 100, 100) _
.Adjustments(1) = 0.4
.AddShape(msoShapeCross, 150, 10, 100, 100) _
.Adjustments(1) = 0.2
End With