AllowAutoFit Property

Microsoft Word Visual Basic

AllowAutoFit Property

       

Allows Microsoft Word to automatically resize cells in a table to fit their contents. Read/write Boolean.

expression.AllowAutoFit

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

Example

This example sets the first table in the active document to automatically resize based on its contents.

Sub AllowFit()
    ActiveDocument.Tables(1).AllowAutoFit = True
End Sub