Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

Returns a boolean that represents whether or not this table's width will be set automatically by Word.

Signature
C#
C#
<table class="diff-macro"><thead><tr><th class="diff-macro-title">unmigrated-wiki-markup</th></tr></thead><tbody><tr><td class="diff-macro-body"><pre>
 public boolean AutoWidth{ get; set; }
</pre></td></tr></tbody></table>
Signature
vb.net
vb.net
Public <p>Public Property AutoWidth() As Boolean</p>Boolean
Remarks

MS Word equivalent: Table menu > Table Properties... > Table tab > Options... > Automatically resize to fit contents

Info

You will have to call table.SetPreferredColumnWidthUnits(i,TableCell.WidthUnits.Auto) to have each column adjusted to fit the text

Example
Code Block
csharp
csharp
titleC#
            boolean autoWidth = oTableFormatting.AutoWidth;
        
Code Block
vb.net
vb.net
titlevb.net
            Dim autoWidth As Boolean = oTableFormatting.AutoWidth