Table.AutoFitBehavior(WdAutoFitBehavior) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines how Microsoft Word resizes a table when the AutoFit feature is used.
public:
void AutoFitBehavior(Microsoft::Office::Interop::Word::WdAutoFitBehavior Behavior);
public void AutoFitBehavior (Microsoft.Office.Interop.Word.WdAutoFitBehavior Behavior);
abstract member AutoFitBehavior : Microsoft.Office.Interop.Word.WdAutoFitBehavior -> unit
Public Sub AutoFitBehavior (Behavior As WdAutoFitBehavior)
Parameters
- Behavior
- WdAutoFitBehavior
Required WdAutoFitBehavior. How Word resizes the specified table with the AutoFit feature is used.Can be one of these WdAutoFitBehavior constants: wdAutoFitContentwdAutoFitWindowwdAutoFitFixed
Remarks
Word can resize the table based on the content of the table cells or the width of the document window. You can also use this method to turn off AutoFit so that the table size is fixed, regardless of cell contents or window width.
Setting the AutoFit behavior to wdAutoFitContent or wdAutoFitWindow sets the AllowAutoFit property to True if it's currently False. Likewise, setting the AutoFit behavior to wdAutoFitFixed sets the AllowAutoFit property to False if it's currently True.