Hi,



I have a large word document, which gets a little bit difficult to
read.

It has large amounts of tables with text mentioned below in the table.

I want to keep the tables in hide mode, when the user clicks on a
button to show the content of the table , i want the table to be
displayed

It would be easier for the readers to browse the information also.

How can i do this? it will be great if you could help

Thanking you in anticipation

Regards,
Rajesh

Re: Hide Table/Show Table macro by Doug

Doug
Thu Jun 19 03:29:50 PDT 2008

If you select the table and insert a bookmark for it - I used Table as the
name of the bookmark, you can use the following code in a macro to hide it

ActiveDocument.Bookmarks("Table").Range.Font.Hidden = True

you would use

ActiveDocument.Bookmarks("Table").Range.Font.Hidden = False

to display it.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"newbei" <newtoqtopia@yahoo.co.in> wrote in message
news:0336afd8-9fbf-4f58-80ab-c6cca7979a66@i36g2000prf.googlegroups.com...
> Hi,
>
>
>
> I have a large word document, which gets a little bit difficult to
> read.
>
> It has large amounts of tables with text mentioned below in the table.
>
> I want to keep the tables in hide mode, when the user clicks on a
> button to show the content of the table , i want the table to be
> displayed
>
> It would be easier for the readers to browse the information also.
>
> How can i do this? it will be great if you could help
>
> Thanking you in anticipation
>
> Regards,
> Rajesh



Re: Hide Table/Show Table macro by newbei

newbei
Thu Jun 19 06:08:06 PDT 2008

Doug,

Thanks a ton for taking out the time to reply to my query.
Forgive my ignorance, but I have no idea about how to create a macro
or install it.
Would it possible for you to share a template file with the
implementation or tell me the procedure to do so?

Rajesh

Doug Robbins - Word MVP wrote:
> If you select the table and insert a bookmark for it - I used Table as the
> name of the bookmark, you can use the following code in a macro to hide it
>
> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = True
>
> you would use
>
> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = False
>
> to display it.
>
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> news:0336afd8-9fbf-4f58-80ab-c6cca7979a66@i36g2000prf.googlegroups.com...
> > Hi,
> >
> >
> >
> > I have a large word document, which gets a little bit difficult to
> > read.
> >
> > It has large amounts of tables with text mentioned below in the table.
> >
> > I want to keep the tables in hide mode, when the user clicks on a
> > button to show the content of the table , i want the table to be
> > displayed
> >
> > It would be easier for the readers to browse the information also.
> >
> > How can i do this? it will be great if you could help
> >
> > Thanking you in anticipation
> >
> > Regards,
> > Rajesh

Re: Hide Table/Show Table macro by stevencraigmiller(at)comcast(dot)net>

stevencraigmiller(at)comcast(dot)net>
Thu Jun 19 09:55:00 PDT 2008

How to Install a Macro
The shortcut key Alt-F11 will take you to the VBA editor.
The shortcut key Ctrl-R will open the Project Explorer (if it is not already
open).
Click on the template where you would like to store your macro, for example
click on â??Normal.â??
Insert a new Module with: Insert > Module.
The code window has General & Declarations at the top.
Cut and past your macro into the code window.
You can store more than one macro in a module.
You can re-name your module by clicking on F4, this should bring up the
Properties Window. In the field following â??(name)â?? you can change the
moduleâ??s name.
To run your macro, go back to your document and click on Alt-F8.
Alt-F8 will bring up the macro menu from which you can pick your macro and
run it.

Steven Craig Miller

"newbei" wrote:

> Doug,
>
> Thanks a ton for taking out the time to reply to my query.
> Forgive my ignorance, but I have no idea about how to create a macro
> or install it.
> Would it possible for you to share a template file with the
> implementation or tell me the procedure to do so?
>
> Rajesh
>
> Doug Robbins - Word MVP wrote:
> > If you select the table and insert a bookmark for it - I used Table as the
> > name of the bookmark, you can use the following code in a macro to hide it
> >
> > ActiveDocument.Bookmarks("Table").Range.Font.Hidden = True
> >
> > you would use
> >
> > ActiveDocument.Bookmarks("Table").Range.Font.Hidden = False
> >
> > to display it.
> >
> >
> > --
> > Hope this helps.
> >
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
> >
> > Doug Robbins - Word MVP
> >
> > "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> > news:0336afd8-9fbf-4f58-80ab-c6cca7979a66@i36g2000prf.googlegroups.com...
> > > Hi,
> > >
> > >
> > >
> > > I have a large word document, which gets a little bit difficult to
> > > read.
> > >
> > > It has large amounts of tables with text mentioned below in the table.
> > >
> > > I want to keep the tables in hide mode, when the user clicks on a
> > > button to show the content of the table , i want the table to be
> > > displayed
> > >
> > > It would be easier for the readers to browse the information also.
> > >
> > > How can i do this? it will be great if you could help
> > >
> > > Thanking you in anticipation
> > >
> > > Regards,
> > > Rajesh
>

Re: Hide Table/Show Table macro by stevencraigmiller(at)comcast(dot)net>

stevencraigmiller(at)comcast(dot)net>
Thu Jun 19 09:57:02 PDT 2008

Doug,

I've always wanted to do this. Using bookmarks works great, although in my
opinion, it worked best if I selected (and so included) the blank line before
and after the table.

Steven Craig Miller



"Doug Robbins - Word MVP" wrote:

> If you select the table and insert a bookmark for it - I used Table as the
> name of the bookmark, you can use the following code in a macro to hide it
>
> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = True
>
> you would use
>
> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = False
>
> to display it.
>
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> news:0336afd8-9fbf-4f58-80ab-c6cca7979a66@i36g2000prf.googlegroups.com...
> > Hi,
> >
> >
> >
> > I have a large word document, which gets a little bit difficult to
> > read.
> >
> > It has large amounts of tables with text mentioned below in the table.
> >
> > I want to keep the tables in hide mode, when the user clicks on a
> > button to show the content of the table , i want the table to be
> > displayed
> >
> > It would be easier for the readers to browse the information also.
> >
> > How can i do this? it will be great if you could help
> >
> > Thanking you in anticipation
> >
> > Regards,
> > Rajesh
>
>
>

Re: Hide Table/Show Table macro by stevencraigmiller(at)comcast(dot)net>

stevencraigmiller(at)comcast(dot)net>
Thu Jun 19 10:10:02 PDT 2008

Also, you could use this macro:

'
' Hide/Unhide Table
' Run this macro once to hide the table,
' Run it again to unhide the table.
'
Sub HideTable()
Dim sBookmark As String

sBookmark = "Table"

If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
exit."
Exit Sub
End If

With ActiveDocument.Bookmarks(sBookmark).Range.Font
If .Hidden = True Then
.Hidden = False
Else
.Hidden = True
End If
End With
End Sub


Re: Hide Table/Show Table macro by Doug

Doug
Thu Jun 19 12:30:13 PDT 2008

That's assuming that there is an empty paragraph before and after.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"StevenM" <stevencraigmiller(at)comcast(dot)net> wrote in message
news:9BCC3090-0267-4435-908A-DBC304382824@microsoft.com...
> Doug,
>
> I've always wanted to do this. Using bookmarks works great, although in my
> opinion, it worked best if I selected (and so included) the blank line
> before
> and after the table.
>
> Steven Craig Miller
>
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> If you select the table and insert a bookmark for it - I used Table as
>> the
>> name of the bookmark, you can use the following code in a macro to hide
>> it
>>
>> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = True
>>
>> you would use
>>
>> ActiveDocument.Bookmarks("Table").Range.Font.Hidden = False
>>
>> to display it.
>>
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
>> news:0336afd8-9fbf-4f58-80ab-c6cca7979a66@i36g2000prf.googlegroups.com...
>> > Hi,
>> >
>> >
>> >
>> > I have a large word document, which gets a little bit difficult to
>> > read.
>> >
>> > It has large amounts of tables with text mentioned below in the table.
>> >
>> > I want to keep the tables in hide mode, when the user clicks on a
>> > button to show the content of the table , i want the table to be
>> > displayed
>> >
>> > It would be easier for the readers to browse the information also.
>> >
>> > How can i do this? it will be great if you could help
>> >
>> > Thanking you in anticipation
>> >
>> > Regards,
>> > Rajesh
>>
>>
>>



Re: Hide Table/Show Table macro by newbei

newbei
Mon Jul 07 06:20:40 PDT 2008

Hi Steven,

Thanks a ton for sharing the code.
However i found a limitation of the code or may be i am doing
something wrong.

I found that if the table has more than 7 rows this macro doesnt
unhide the table back.

Could you confirm if this is the real reason or i am doing something
wrong.

Rajesh

StevenM at dot wrote:

> Also, you could use this macro:
>
> '
> ' Hide/Unhide Table
> ' Run this macro once to hide the table,
> ' Run it again to unhide the table.
> '
> Sub HideTable()
> Dim sBookmark As String
>
> sBookmark = "Table"
>
> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
> exit."
> Exit Sub
> End If
>
> With ActiveDocument.Bookmarks(sBookmark).Range.Font
> If .Hidden = True Then
> .Hidden = False
> Else
> .Hidden = True
> End If
> End With
> End Sub

Re: Hide Table/Show Table macro by Jay

Jay
Mon Jul 07 07:58:06 PDT 2008

Hi newbei,

There is no limit on the number of rows the macro can handle. What I suspect is
happening is that you added more rows to the bottom of the table, and they're
outside the bookmark. The macro hides and unhides only the part of the table
that is inside the bookmark.

Try selecting the whole table and inserting the "Table" bookmark again, and then
run the macro.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.

On Mon, 7 Jul 2008 06:20:40 -0700 (PDT), newbei <newtoqtopia@yahoo.co.in> wrote:

>Hi Steven,
>
>Thanks a ton for sharing the code.
>However i found a limitation of the code or may be i am doing
>something wrong.
>
>I found that if the table has more than 7 rows this macro doesnt
>unhide the table back.
>
>Could you confirm if this is the real reason or i am doing something
>wrong.
>
>Rajesh
>
>StevenM at dot wrote:
>
>> Also, you could use this macro:
>>
>> '
>> ' Hide/Unhide Table
>> ' Run this macro once to hide the table,
>> ' Run it again to unhide the table.
>> '
>> Sub HideTable()
>> Dim sBookmark As String
>>
>> sBookmark = "Table"
>>
>> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
>> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
>> exit."
>> Exit Sub
>> End If
>>
>> With ActiveDocument.Bookmarks(sBookmark).Range.Font
>> If .Hidden = True Then
>> .Hidden = False
>> Else
>> .Hidden = True
>> End If
>> End With
>> End Sub

Re: Hide Table/Show Table macro by Doug

Doug
Mon Jul 07 12:30:25 PDT 2008

The following code does not required that the whole of the table be
included in the bookmark

Dim sBookmark As String
sBookmark = "Table"
If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
exist."
Exit Sub
End If
With ActiveDocument.Bookmarks(sBookmark).Range.Tables(1).Range.Font
If .Hidden = True Then
.Hidden = False
Else
.Hidden = True
End If
End With

However, you indicated that the problem was that you could not unhide all of
the table. Did it all get hidden in the first place?
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"newbei" <newtoqtopia@yahoo.co.in> wrote in message
news:a6d6963f-6384-4a46-a16e-35e68996e284@56g2000hsm.googlegroups.com...
> Hi Steven,
>
> Thanks a ton for sharing the code.
> However i found a limitation of the code or may be i am doing
> something wrong.
>
> I found that if the table has more than 7 rows this macro doesnt
> unhide the table back.
>
> Could you confirm if this is the real reason or i am doing something
> wrong.
>
> Rajesh
>
> StevenM at dot wrote:
>
>> Also, you could use this macro:
>>
>> '
>> ' Hide/Unhide Table
>> ' Run this macro once to hide the table,
>> ' Run it again to unhide the table.
>> '
>> Sub HideTable()
>> Dim sBookmark As String
>>
>> sBookmark = "Table"
>>
>> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
>> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does
>> not
>> exit."
>> Exit Sub
>> End If
>>
>> With ActiveDocument.Bookmarks(sBookmark).Range.Font
>> If .Hidden = True Then
>> .Hidden = False
>> Else
>> .Hidden = True
>> End If
>> End With
>> End Sub



Re: Hide Table/Show Table macro by newbei

newbei
Mon Jul 07 22:23:57 PDT 2008

Doug,

Thanks for your reply.

>However, you indicated that the problem was that you could not unhide all of
> the table. Did it all get hidden in the first place?

Yep , this is exactly the problem.The table gets hidden upon pressing
the hide button but doesnt unhide at all once teh row count is more
than 7 .

What could be the problem?

Rajesh




Doug Robbins - Word MVP wrote:

> The following code does not required that the whole of the table be
> included in the bookmark
>
> Dim sBookmark As String
> sBookmark = "Table"
> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
> exist."
> Exit Sub
> End If
> With ActiveDocument.Bookmarks(sBookmark).Range.Tables(1).Range.Font
> If .Hidden = True Then
> .Hidden = False
> Else
> .Hidden = True
> End If
> End With
>
> However, you indicated that the problem was that you could not unhide all of
> the table. Did it all get hidden in the first place?
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> news:a6d6963f-6384-4a46-a16e-35e68996e284@56g2000hsm.googlegroups.com...
> > Hi Steven,
> >
> > Thanks a ton for sharing the code.
> > However i found a limitation of the code or may be i am doing
> > something wrong.
> >
> > I found that if the table has more than 7 rows this macro doesnt
> > unhide the table back.
> >
> > Could you confirm if this is the real reason or i am doing something
> > wrong.
> >
> > Rajesh
> >
> > StevenM at dot wrote:
> >
> >> Also, you could use this macro:
> >>
> >> '
> >> ' Hide/Unhide Table
> >> ' Run this macro once to hide the table,
> >> ' Run it again to unhide the table.
> >> '
> >> Sub HideTable()
> >> Dim sBookmark As String
> >>
> >> sBookmark = "Table"
> >>
> >> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> >> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does
> >> not
> >> exit."
> >> Exit Sub
> >> End If
> >>
> >> With ActiveDocument.Bookmarks(sBookmark).Range.Font
> >> If .Hidden = True Then
> >> .Hidden = False
> >> Else
> >> .Hidden = True
> >> End If
> >> End With
> >> End Sub

Re: Hide Table/Show Table macro by newbei

newbei
Mon Jul 07 23:09:42 PDT 2008

Doug,

Thanks for your response.
> However, you indicated that the problem was that you could not unhide all of
> the table. Did it all get hidden in the first place?

Exactly, this is the problem . I can still hide the table using the
macro but it doesnt unhide if the row count is more than 7 .

Alos when i press on hide , i want th ebutton text to show"Show" , how
would that be possible.

Thanks a lot for your help

Regards,

Rajesh

Doug Robbins - Word MVP wrote:

> The following code does not required that the whole of the table be
> included in the bookmark
>
> Dim sBookmark As String
> sBookmark = "Table"
> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
> exist."
> Exit Sub
> End If
> With ActiveDocument.Bookmarks(sBookmark).Range.Tables(1).Range.Font
> If .Hidden = True Then
> .Hidden = False
> Else
> .Hidden = True
> End If
> End With
>
> However, you indicated that the problem was that you could not unhide all of
> the table. Did it all get hidden in the first place?
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> news:a6d6963f-6384-4a46-a16e-35e68996e284@56g2000hsm.googlegroups.com...
> > Hi Steven,
> >
> > Thanks a ton for sharing the code.
> > However i found a limitation of the code or may be i am doing
> > something wrong.
> >
> > I found that if the table has more than 7 rows this macro doesnt
> > unhide the table back.
> >
> > Could you confirm if this is the real reason or i am doing something
> > wrong.
> >
> > Rajesh
> >
> > StevenM at dot wrote:
> >
> >> Also, you could use this macro:
> >>
> >> '
> >> ' Hide/Unhide Table
> >> ' Run this macro once to hide the table,
> >> ' Run it again to unhide the table.
> >> '
> >> Sub HideTable()
> >> Dim sBookmark As String
> >>
> >> sBookmark = "Table"
> >>
> >> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> >> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does
> >> not
> >> exit."
> >> Exit Sub
> >> End If
> >>
> >> With ActiveDocument.Bookmarks(sBookmark).Range.Font
> >> If .Hidden = True Then
> >> .Hidden = False
> >> Else
> >> .Hidden = True
> >> End If
> >> End With
> >> End Sub

Re: Hide Table/Show Table macro by Doug

Doug
Tue Jul 08 03:10:14 PDT 2008

With the table visible, first run a macro containing the following code:

ActiveDocument.Variables("hidden") = False

to set a flag that can be referred to by a macro containing the following
code that will do the hiding/unhiding as required

Dim sBookmark As String
sBookmark = "Table"
If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
exist."
Exit Sub
End If
With ActiveDocument
If .Variables("hidden") = True Then
.Bookmarks(sBookmark).Range.Tables(1).Range.Font.Hidden = False
.Variables("hidden") = False
Else
.Bookmarks(sBookmark).Range.Tables(1).Range.Font.Hidden = True
.Variables("hidden") = True
End If
End With



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"newbei" <newtoqtopia@yahoo.co.in> wrote in message
news:eff94bc4-65a4-4a22-be48-aa573cca8d56@j22g2000hsf.googlegroups.com...
> Doug,
>
> Thanks for your response.
>> However, you indicated that the problem was that you could not unhide all
>> of
>> the table. Did it all get hidden in the first place?
>
> Exactly, this is the problem . I can still hide the table using the
> macro but it doesnt unhide if the row count is more than 7 .
>
> Alos when i press on hide , i want th ebutton text to show"Show" , how
> would that be possible.
>
> Thanks a lot for your help
>
> Regards,
>
> Rajesh
>
> Doug Robbins - Word MVP wrote:
>
>> The following code does not required that the whole of the table be
>> included in the bookmark
>>
>> Dim sBookmark As String
>> sBookmark = "Table"
>> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
>> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does
>> not
>> exist."
>> Exit Sub
>> End If
>> With ActiveDocument.Bookmarks(sBookmark).Range.Tables(1).Range.Font
>> If .Hidden = True Then
>> .Hidden = False
>> Else
>> .Hidden = True
>> End If
>> End With
>>
>> However, you indicated that the problem was that you could not unhide all
>> of
>> the table. Did it all get hidden in the first place?
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
>> news:a6d6963f-6384-4a46-a16e-35e68996e284@56g2000hsm.googlegroups.com...
>> > Hi Steven,
>> >
>> > Thanks a ton for sharing the code.
>> > However i found a limitation of the code or may be i am doing
>> > something wrong.
>> >
>> > I found that if the table has more than 7 rows this macro doesnt
>> > unhide the table back.
>> >
>> > Could you confirm if this is the real reason or i am doing something
>> > wrong.
>> >
>> > Rajesh
>> >
>> > StevenM at dot wrote:
>> >
>> >> Also, you could use this macro:
>> >>
>> >> '
>> >> ' Hide/Unhide Table
>> >> ' Run this macro once to hide the table,
>> >> ' Run it again to unhide the table.
>> >> '
>> >> Sub HideTable()
>> >> Dim sBookmark As String
>> >>
>> >> sBookmark = "Table"
>> >>
>> >> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
>> >> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & "
>> >> does
>> >> not
>> >> exit."
>> >> Exit Sub
>> >> End If
>> >>
>> >> With ActiveDocument.Bookmarks(sBookmark).Range.Font
>> >> If .Hidden = True Then
>> >> .Hidden = False
>> >> Else
>> >> .Hidden = True
>> >> End If
>> >> End With
>> >> End Sub



Re: Hide Table/Show Table macro by newbei

newbei
Tue Jul 08 05:39:28 PDT 2008

test

Doug Robbins - Word MVP wrote:
> The following code does not required that the whole of the table be
> included in the bookmark
>
> Dim sBookmark As String
> sBookmark = "Table"
> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does not
> exist."
> Exit Sub
> End If
> With ActiveDocument.Bookmarks(sBookmark).Range.Tables(1).Range.Font
> If .Hidden = True Then
> .Hidden = False
> Else
> .Hidden = True
> End If
> End With
>
> However, you indicated that the problem was that you could not unhide all of
> the table. Did it all get hidden in the first place?
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "newbei" <newtoqtopia@yahoo.co.in> wrote in message
> news:a6d6963f-6384-4a46-a16e-35e68996e284@56g2000hsm.googlegroups.com...
> > Hi Steven,
> >
> > Thanks a ton for sharing the code.
> > However i found a limitation of the code or may be i am doing
> > something wrong.
> >
> > I found that if the table has more than 7 rows this macro doesnt
> > unhide the table back.
> >
> > Could you confirm if this is the real reason or i am doing something
> > wrong.
> >
> > Rajesh
> >
> > StevenM at dot wrote:
> >
> >> Also, you could use this macro:
> >>
> >> '
> >> ' Hide/Unhide Table
> >> ' Run this macro once to hide the table,
> >> ' Run it again to unhide the table.
> >> '
> >> Sub HideTable()
> >> Dim sBookmark As String
> >>
> >> sBookmark = "Table"
> >>
> >> If ActiveDocument.Bookmarks.Exists(sBookmark) = False Then
> >> MsgBox "The Bookmark " & Chr(34) & sBookmark & Chr(34) & " does
> >> not
> >> exit."
> >> Exit Sub
> >> End If
> >>
> >> With ActiveDocument.Bookmarks(sBookmark).Range.Font
> >> If .Hidden = True Then
> >> .Hidden = False
> >> Else
> >> .Hidden = True
> >> End If
> >> End With
> >> End Sub