Cells.AutoFit Method
Word Developer Reference |
Changes the width of a table column to accommodate the width of the text without changing the way text wraps in the cells.
Syntax
expression.AutoFit
expression Required. A variable that represents a Cells collection.
Remarks
If the table is already as wide as the distance between the left and right margins, this method has no affect.
Example
This example creates a 3x3 table in a new document and then changes the width of the first column to accommodate the width of the text.
Visual Basic for Applications |
---|
|
This example creates a 3x3 table in a new document and then changes the width of all the columns to accommodate the width of the text.
Visual Basic for Applications |
---|
|
See Also