Set table to default "AutoFit to Window"

Is there a way to set AutoFit to Window as a default for my tables within a template?


I know I can change each table one by one.


I'm trying to use a table in my header so when I insert a section break my table will automatically "fit" to the page.  I can do it manually but I'm tryig to automate it for authors.


Any thoughts?


AutoFit to Window should be the default when creating new tables in Word. However, to change the setting for existing tables, you can use the following macro:

Sub SetFitToWin()
Dim t As Table
For Each t In ActiveDocument.Tables
t.AutoFitBehavior wdAutoFitWindow
Next t
End Sub

For assistance with the macro, see

Stefan Blom
Word MVP
Volunteer Moderator
Note that MVPs do not work for Microsoft
MVP program info:
MS Community FAQ:

5 people found this reply helpful


Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.


Question Info

Last updated August 5, 2020 Views 3,419 Applies to: