Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Diagonal Property [Publisher 2003 VBA Language Reference]

Office 2003

PbCellDiagonalType can be one of these PbCellDiagonalType constants.
pbTableCellDiagonalDown
pbTableCellDiagonalMixed
pbTableCellDiagonalNone
pbTableCellDiagonalUp

expression.Diagonal

expression Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a page to the active publication, creates a table on that new page, and diagonally splits all cells in even-numbered columns.

Sub CreateNewTable()

    Dim pgeNew As Page
    Dim shpTable As Shape
    Dim tblNew As Table
    Dim celTable As Cell
    Dim rowTable As Row

    'Creates a new document with a five-row by five-column table
    Set pgeNew = ActiveDocument.Pages.Add(Count:=1, After:=1)
    Set shpTable = pgeNew.Shapes.AddTable(NumRows:=5, NumColumns:=5, _
        Left:=72, Top:=72, Width:=468, Height:=100)
    Set tblNew = shpTable.Table

    'Inserts a diagonal split into all cells in even-numbered columns
    For Each rowTable In tblNew.Rows
        For Each celTable In rowTable.Cells
            If celTable.Column Mod 2 = 0 Then
                celTable.Diagonal = pbTableCellDiagonalUp
            End If
        Next celTable
    Next rowTable

End Sub
		


Applies to | Cell Object


Show: