Autofit multiple tables to window

S

Stacey

I exported a number of tables from another program into my Word document. Now
I need to format all these tables (about 50 pages worth) so that they fit
across the width of my page. How do I "autofit to window" multiple tables at
the same time?
 
J

Jezebel

I had to do exactly this just last week --

Sub Macro1()
'
Dim pT As Word.Table

For Each pT In ActiveDocument.Tables
pT.PreferredWidth = MillimetersToPoints(170)
Next

MsgBox "done"

End Sub

In my case I needed all the tables to be 170mm wide -- insert your own value
as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top