Hi,
I don't know everything, but I feel okay about two answers that I have about
this issue (neither of which you'll like, I guess):
1) I don't think you can fully hide a table's column in Word. The width of
the column will always be there to some degree (at least in my testing,
which has NOT been exhaustive)
2) If you really want to hide a column, use Excel.
Sorry, I'm not trying to be glib, I just don't think you can do what you're
trying to do with Word.
Another method to do this would be to hide the contents of the column:
Dim oTbl As Table
Dim oCol As Column
Dim oRng As Range
Set oTbl = ActiveDocument.Tables(3)
Set oRng = oTbl.Range
Set oCol = oTbl.Columns(1)
oCol.Select
Selection.Font.Hidden = True
Convert the table to text:
oTbl.ConvertToText Separator:=wdSeparateByTabs
Replace a hidden tab, with some other character:
With oRng.Find
.ClearFormatting
.Text = "^t"
.Font.Hidden = True
With .Replacement
.ClearFormatting
.Text = ","
End With
.Execute Replace:=wdReplaceAll
End With
Covert the text back to a table:
oRng.ConvertToTable Separator:=wdSeparateByTabs
So, then, you end up with the column hidden, but now you have a table with
no borders and you're left with the problem of "adding" the column back.
HTH,
Dave
> Dave,
> I am trying to hide a column with the following code but it still displays
[quoted text clipped - 21 lines]
>> >do I
>> > get information on the 3rd table (e.g. table3.column1.width)
Ed - 17 Aug 2006 14:36 GMT
Dave and NJ - My Table dialog just told me the measurement has to be at
least 0.02 inches. If you do that and hide one of the side borders, it
looks like the column isn't there.
Ed
> Hi,
>
[quoted text clipped - 69 lines]
>>> >do I
>>> > get information on the 3rd table (e.g. table3.column1.width)