Table of contents
Collapse the table of content
Expand the table of content

Table.TableDirection Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Returns or sets a PbTableDirectionType constant that represents whether text in a table is read from left to right or from right to left. Read/write.


expression. TableDirection

_expression_A variable that represents a Table object.

Return Value



The TableDirection property value can be one of the PbTableDirectionType constants declared in the Microsoft Publisher type library.

| pbTableDirectionLeftToRight| | pbTableDirectionRightToLeft|


This example enters a bold number into each cell in the specified table, and then sets the direction of the table so that the cells number from right to left. For this example to work, the specified shape must be a table.

Sub CountCellsByColumn() 
 Dim tblTable As Table 
 Dim rowTable As row 
 Dim celTable As Cell 
 Dim intCount As Integer 

 Set tblTable = ActiveDocument.Pages(1).Shapes(1).Table 

 'Loops through each row in the table 
 For Each rowTable In tblTable.Rows 

 'Loops through each cell in the row 
 For Each celTable In rowTable.Cells 
 With celTable.TextRange 
 intCount = intCount + 1 
 .Text = intCount 
 .ParagraphFormat.Alignment = _ 
 .Font.Bold = msoTrue 
 End With 
 Next celTable 
 Next rowTable 
 tblTable.TableDirection = pbTableDirectionRightToLeft 
End Sub
© 2018 Microsoft