Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
G'Day Ulrich,
Try this: Sub ColumnAlign() ' Using your sample code..... Set Tbl = WordDoc.Tables.Add(somRange, intRows, intCols) ' You have put some text into a cell Tbl.Cell(iRow, iCol).Range.Text = someText : ' We have NO IDEA where the insertion point is at this time.... '....so select the text we inserted.... Tbl.Cell(iRow, iCol).Range.Select : ' Now that the Insertion Point is in that same Cell - Select the Column..... Selection.SelectColumn ' ....and Format It Selection.ParagraphFormat.Alignment = wdAlignParagraphRight End Sub -- Regards, Pat Garard Melbourne, Australia _______________________ "Ulrich" wrote in message ... Hi, how can i (right-)align a table's column in vb? I use the following code: Set Tbl = WordDoc.Tables.Add(somRange, intRows, intCols) Tbl.Cell(iRow, iCol).Range.Text = someText Now i want to right-align or center one of the columns icol. Using the table or selection range-method .Rows.Alignment=wdAlignRowRight does not work! What do i do wrong? Please help me someone. Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
align text center and right on the same line | Microsoft Word Help | |||
howto search for a word in more than one *.doc (search in all doc's in a folder)? | Microsoft Word Help | |||
align right problems everything aligns right not selction | Page Layout | |||
how to align list numbers on decimal | New Users | |||
How do I vertically align a table in Word? | Tables |