Re: Table won't hide
- From: Gordon Bentley-Mix <gordon(dot)bentleymix(at)gmail(dot)com>
- Date: Mon, 16 Feb 2009 12:56:18 -0800
Sadly this still does not resolve the problem. Even repurposing a table that
I *know* hides properly under the correct conditions, the process still only
hides the text within the table and not the table itself.
~sigh~
Oh well. It looks a bit odd, but I guess I'll just have to live with it.
--
Cheers!
Gordon Bentley-Mix
Word MVP
Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
"Janine" wrote:
Gordon,.
I'd redo the table from scratch - then run the code again.
Janinw
"Gordon Bentley-Mix" <gordon(dot)bentleymix(at)gmail(dot)com> wrote in
message news:0C41C26F-0AF8-4E4C-9F0A-81319524B4C8@xxxxxxxxxxxxxxxx
Here's an odd one for you all:
Word 2003 under Windows XP
I have a template set up to toggle the visibility of certain portions of
the
document depending on the values input through a UserForm. For example, if
the "Goods Schedule" checkbox is selected, the related "Goods Schedule"
page
is displayed; if the checkbox isn't selected, then the page is hidden.
This
is accomplished by wrapping the content in a bookmark and setting the
Hidden
property of the Font bookmark's Range. I do this a lot, so I've written a
couple of "generic" procedures that accept arguments for toggling the
visibility, as follows:
Public Sub HideBookmarkRange(BkmkName As String)
With myDoc
If .Bookmarks.Exists(BkmkName) Then
.Bookmarks(BkmkName).Range.Font.Hidden = True
End With
End Sub
Public Sub ShowBookmarkRange(BkmkName As String)
With myDoc
If .Bookmarks.Exists(BkmkName) Then
.Bookmarks(BkmkName).Range.Font.Hidden = False
End With
End Sub
In some cases the content is a portion of a table (one or more rows), but
of
course it's impossible to wrap a bookmark around a single row or several
rows
within a table. In these instances, I've spilt the table at the
appropriate
points and wrapped the bookmark around the whole table, including the
paragraph before the table. This works _most_ of the time.
HOWEVER... One table refuses to hide. The text within the table is
formatted
as hidden, but the table itself is still visible. I've tried adding a
paragraph after the table and including this paragraph in the bookmark,
and
I've even tried manually setting the font to hidden. Nothing seems to
work.
As far as I can tell, this table is no different from any of the others in
the template. All of the properties are the same; the style applied to the
paragraph before the table is the same; and there are no styles applied to
any of the content within the table that aren't used in other tables
elsewhere.
Any ideas as to why this table and this table only refuses to play nice
and
hide like the rest of them do?
--
Cheers!
Gordon Bentley-Mix
Word MVP
Uninvited email contact will be marked as SPAM and ignored. Please post
all
follow-ups to the newsgroup.
- Follow-Ups:
- Re: Table won't hide
- From: Doug Robbins - Word MVP
- Re: Table won't hide
- References:
- Table won't hide
- From: Gordon Bentley-Mix
- Re: Table won't hide
- From: Janine
- Table won't hide
- Prev by Date: Re: building an array for a listbox
- Next by Date: Re: Overriding the default menu item functionality.
- Previous by thread: Re: Table won't hide
- Next by thread: Re: Table won't hide
- Index(es):
Relevant Pages
|