atw: Word macro - set table width
- From: Ilana Cohney <Ilana.Cohney@xxxxxxxxxxxxxxxxxx>
- To: austechwriter@xxxxxxxxxxxxx
- Date: Thu, 23 Dec 2004 10:16:43 +1100
Hi all,
Would any of you happen to know how to write a macro that runs through a
document and sets all tables to a set width. I generate my Word XP
documents via AuthorIT and the tables come out all different widths
which looks terrible. I have tried writing a macro but my macro skills
are still in the very beginnning stages. So far my macro looks like this:
Sub Fixed_width_Tables()
Dim myObject As Table
For Each myObject In ActiveDocument.Tables
With Selection.Tables(1)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(13)
End With
Next
End Sub
My problem is that it works for one table and then stops! Any idea how
to tell it to continue on through the document and resize all tables.
Thanks for your help.
Ilana
**************************************************
To post a message to austechwriter, send the message to
austechwriter@xxxxxxxxxxxxxx
To subscribe to austechwriter, send a message to
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.
To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with
"unsubscribe" in the Subject field.
To search the austechwriter archives, go to
www.freelists.org/archives/austechwriter
To contact the list administrator, send a message to
austechwriter-admins@xxxxxxxxxxxxx
**************************************************
- Follow-Ups:
- atw: Re: Word macro - set table width
- From: Steve Hudson
- References:
- atw: Accreditation - again
- From: Allan Charlton
Other related posts:
- » atw: Word macro - set table width
- atw: Re: Word macro - set table width
- From: Steve Hudson
- atw: Accreditation - again
- From: Allan Charlton