Jean-Guy Marcil said:
(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
Sorry, but I think that as is, your post is difficult to comprehend.
You start mentioning a chart, but finish with a table. Which is it?
Also, you write:
"the nested tables in one column"
what nested tables? How did they get there? Which column of which table? I
thought you were writing about a chart?
Finally, you posted in a group dealing with programming Word (VBA= Visual
Basic for Applications), are you asking asking about code or a direct
interaction in the document?
Salut, Jean-Guy.
Sorry about being confusing. I was using chart and table
interchangeably, which I shouldn't have. I'm actually dealing with a
table in a Word doc. The table's third column contains a nested table
in each row. It's this column that I'm trying to resize. Actually, I
did solve the problem, but I'm sure I did it in a non-standard way that
you guys would be horrified at.

Here's how I did it:
Sub tablefixing()
'
' tablefixing Macro
' Macro recorded 6/16/2006 by Brian Hartman
'
Selection.Homekey Unit:=wdStory `goes to the top of the document
Selection.Find.ClearFormatting ' All this code below finds the
right column
Selection.Find.Font.Bold = True
With Selection.Find
.Text = "Drug Development Phase"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Tables(1).Select 'this selects the column
With Selection.Tables(1)
.TopPadding = InchesToPoints(0.02)
.BottomPadding = InchesToPoints(0.02)
.LeftPadding = InchesToPoints(0.02)
.RightPadding = InchesToPoints(0.02)
.Spacing = 0
.AllowPageBreaks = True
.AllowAutoFit = False ' This turns off the AutoFit so that the
whole table shrinks in width (A macro before this runs sets the width
to 9" for the table.)
End With
Selection.Homekey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.Text = "Drug Development Phase"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.SelectColumn
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(5.5) 'This sets
the desired column to 5.5 inches.
End Sub
Then I've got another macro that's whole job is to set the table's
width to 10" (on landscaped paper) so that it fits on a page. I guess
it's not pretty, but it turns out to work. everything is the right
size and no columns get cut off.