Thanks for the response. I tried using autofitbehavior, but was only
able to use it to set a table's status - not to read what it was.
Maybe I'm not understanding the syntax.
If I have a table declared
Set tbl = selection.Tables(1)
and I have a variable,
Dim Autofit as WdAutoFitBehavior
how do I get the table's current autofit status into that variable?
I tried
Autofit = tbl.autofitbehavior
but that generates an error - autofitbehavior needs a parameter.
Thanks,
Darren
Isa Muqattash wrote:
> Hi,
>
> I am no expert, but check out the documentation on the table object. Hope it
> helps.
>
>
> Determines how Microsoft Word resizes a table when the AutoFit feature is
> used. 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.
>
> expression.AutoFitBehavior(Behavior)
> expression Required. An expression that returns a Table object.
>
> Behavior Required WdAutoFitBehavior. How Word resizes the specified table
> with the AutoFit feature is used.
>
> WdAutoFitBehavior can be one of these WdAutoFitBehavior constants.
> wdAutoFitContent
> wdAutoFitWindow
> wdAutoFitFixed
>
> Remarks
> 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.
>
> Example
> This example sets the AutoFit behavior for the first table in the active
> document to automatically resize based on the width of the document window.
>
> ActiveDocument.Tables(1).AutoFitBehavior _
> wdAutoFitWindow
>
>