Table.TableDirection プロパティ (Publisher)

表内のテキストを左から右へ読み取るか、右から左に読み取るかを表す PbTableDirectionType 定数を設定または返します。 値の取得と設定が可能です。

構文

TableDirection

Table オブジェクトを表す変数。

戻り値

PbTableDirectionType

注釈

TableDirection プロパティの値は、Microsoft Publisher タイプ ライブラリで宣言されている PbTableDirectionType クラスの定数の 1 つである場合があります。pbTableDirectionLeftToRight または pbTableDirectionRightToLeft です。

次の使用例は、指定された表の各セルに太字の数字を入力し、セルの番号の方向が右から左になるように表を設定します。 この使用例を実行するには、指定された図形が表である必要があります。

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 = _ 
 pbParagraphAlignmentCenter 
 .Font.Bold = msoTrue 
 End With 
 Next celTable 
 Next rowTable 
 tblTable.TableDirection = pbTableDirectionRightToLeft 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。