Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Rae Rae is offline
external usenet poster
 
Posts: 14
Default How do I create a Macro for a table that allows it to expand/hide

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?

  #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?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
create macro using excel to word table Ann Tables 1 May 29th 08 10:03 PM
Need to set up twistee to expand and hide details of a paragraph JPaul Microsoft Word Help 1 July 4th 07 03:05 PM
Create a macro to insert a customized table Zippy07 Tables 1 April 21st 06 06:23 PM
How do I create a macro that is a table in word InlovewithJJ Tables 1 April 29th 05 12:42 AM
How do I create a macro to data sort in a table within a protecte. Keenly52 Tables 5 March 29th 05 08:38 AM


All times are GMT +1. The time now is 09:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"