Share via


ShapeRange.Width Property

Returns or sets the width of the specified object, in points. Read/write.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Property Width As Single
    Get
    Set
'Usage
Dim instance As ShapeRange
Dim value As Single

value = instance.Width

instance.Width = value
float Width { get; set; }

Property Value

Type: System.Single
Single

Examples

This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width+ Windows(2).Width' available width

With Windows(1)

    .Width= aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width= aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

This example sets the width for column one in the specified table to 80 points (72 points per inch).

ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width= 80

See Also

Reference

ShapeRange Interface

ShapeRange Members

Microsoft.Office.Interop.PowerPoint Namespace