View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I create a Macro for a table that allows it to expand/hide

You could create the heading as a macrobutton field to call a macro similar
to

Sub ToggleCells()
With Selection.Tables(1)
.Cell(2, 2).Range.Font.Hidden = Not _
.Cell(2, 2).Range.Font.Hidden
End With
End Sub

which will toggle the display the content of cell column 2 row 2 in the
current table.

or

With Selection.Tables(1)
.Rows(2).Range.Font.Hidden = Not _
.Rows(2).Range.Font.Hidden
End With

which will toggle the display of row 2


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Rae wrote:
I am wanting to create a series of tables that display only their
headings until the heading is selected initiating a Macro which
expands the hidden data within the table.
Has anyone done anything similar to this/ know how to create this
macro?