Share via


Width Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

Width property as it applies to the ReaderSpread object.

Returns a Single that represents the width of the page (in points). Read-only.

expression.Width

expression   Required. An expression that returns one of the above objects.

Width property as it applies to the Window object.

Returns or sets a Long that represents the width (in points) of the window. Read/write.

expression.Width

expression   Required. An expression that returns one of the above objects.

Width property as it applies to the Cell, CellRange, and Page objects.

Returns a Long that represent the width (in points) of a cell, range of cells, or page. Read-only.

expression.Width

expression   Required. An expression that returns one of the above objects.

Width property as it applies to the Column and Shape objects.

Returns or sets a Variant that represents the width (in points) of a specified table column or shape. Read/write.

expression.Width

expression   Required. An expression that returns one of the above objects.

Width property as it applies to the ShapeRange object.

Returns a Variant that represents the width (in points) of a specified range of shapes. Read-only.

expression.Width

expression   Required. An expression that returns one of the above objects.

Example

As it applies to the Window object.

This example sets the height and width of the active window if the window is neither maximized nor minimized.

  Sub SetWindowHeight()
    With ActiveWindow
        If .WindowState = pbWindowStateNormal Then
            .Height = InchesToPoints(5)
            .Width = InchesToPoints(5)
        End If
    End With
End Sub

As it applies to the Column object.

This example creates a new table and sets the height and width of the second row and column, respectively.

  Sub SetRowHeightColumnWidth()
    With ActiveDocument.Pages(1).Shapes.AddTable(NumRows:=3, _
            NumColumns:=3, Left:=80, Top:=80, Width:=400, Height:=12).Table
            .Rows(2).Height = 72
            .Columns(2).Width = 72
    End With
End Sub