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