selective display of tables

S

sandeep

Hi,

I am trying to create a single source word document for my project.
The figures and tables depend on the project type.
So, I have created a docproperty "ProjType" and I use this for the selective
display of tables/figures eg. { if {docproperty"ProjType"} = "SW" "
<insert table1>
<insert table2>
"}

This is working fine, but the Table of Contents is getting messed up.
I see additional entries like
eg. 1.1.1 ................................... 26
which points to the inserted table location. How do I get rid of these
entries ?

Strangely, these additional entries are displayed even when "ProjType" is
not "SW"

Kindly help.
 
C

Cindy M.

Hi sandeep,

It's not clear to me whether these items are always in the document, and just
hidden? (If that's the case, how are they hidden?)

When they're supposed to be visible in the document should they appear in the
TOC, or not?

The TOC can pull entries from threes types of source, in any combination:
Styles, Outline level, TC fields. How is your TOC configured in this respect?
I am trying to create a single source word document for my project.
The figures and tables depend on the project type.
So, I have created a docproperty "ProjType" and I use this for the selective
display of tables/figures eg. { if {docproperty"ProjType"} = "SW" "
<insert table1>
<insert table2>
"}

This is working fine, but the Table of Contents is getting messed up.
I see additional entries like
eg. 1.1.1 ................................... 26
which points to the inserted table location. How do I get rid of these
entries ?

Strangely, these additional entries are displayed even when "ProjType" is
not "SW"

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
S

sandeep

Hi Cindy,

Thanks for ur reply :)
The items (tables, figures) are always in the document and they are visible
depending on the value of "ProjType".
These items should appear in the TOC only if they become visible.
But, the additional entries likeappear always.

My TOC options are as follows
TOC \o "1-4" \h \z \u
 
C

Cindy M.

Hi =?Utf-8?B?c2FuZGVlcA==?=,
The items (tables, figures) are always in the document and they are visible
depending on the value of "ProjType".
These items should appear in the TOC only if they become visible.
But, the additional entries like
appear always.

My TOC options are as follows
TOC \o "1-4" \h \z \u
The TOC field indicates that all text formatted with Headings 1 through 4,
plus any paragraph formatted with an outline level is going to be picked up.

You don't detail how the text is hidden, but I'm guessing you apply Hidden
font formatting as direct formatting? Is the text being picked up for the TOC
formatted with a heading style? Or does it have an outline level?

My suggestion would be to *not* pick up Outline levels for the TOC. Pick up
only styles. If necessary, add the style applied to the items (tables,
figures) to the TOC field using the \t switch.

Then create an additional style that incorporates the Hidden font format. Have
your macro apply that style to figures/captions, rather than applying Hidden
font format. The TOC should ignore that style.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

sandeep

Hi Cindy,

I am not using any hidden font formatting.

As described, I am using field code "ProjType". And I am using it in the
foll. format
in my document

{ if {docproperty"ProjType"} = "SW" "

<table 1>
<table 2>

"}

{ if {docproperty"ProjType"} = "HW" "

<table 3>
<table 4>

"}

So, using the properties tab , I assign the value for "ProjType" as SW or HW.
Now when I update the fields, I see table 1, 2 if the ProjType is SW
and I see table 3,4 if it is HW.

But my TOC seems to display all the tables irrespective of the selection and
also displays extra entries
eg.
1.1.1.............................26

If you are referring to some other method of hiding/selecting the tables, do
let me know

Regards
Sandeep
 
C

Cindy M.

Hi =?Utf-8?B?c2FuZGVlcA==?=,
I am not using any hidden font formatting.

As described, I am using field code "ProjType". And I am using it in the
foll. format
in my document
You didn't say explicitly HOW the tables were being displayed/hidden. You've
posted in the VBA (macro) forum, so I was assuming you were using VBA code to
determine what is displaying and what is not. My reply was based on that
assumption.

On re-reading, I see that you're trying to use an IF field. There's nothing VBA
involved in your question. The more proper place to ask this would have been
the word.mailmerge.FIELDS newsgroup.

I believe what you're seeing is a result of how the TOC field searches for
information. The captions are in the document, so it's picking them up. It's
irrelevant whether they're in the "false" section of an IF field. SEQ fields in
all parts of an IF field also update in sequence.

I think you may have to redesign what you're doing. Perhaps work with two sets
of IF statements: one for the caption TEXT and one for the table that's
displayed. IOW, the paragraph(s) for the captions are always displayed, just
varied text.
{ If {docproperty"ProjType"} = "SW" "

<table 1>
<table 2>

"}

{ if {docproperty"ProjType"} = "HW" "

<table 3>
<table 4>

"}

So, using the properties tab , I assign the value for "ProjType" as SW or HW.
Now when I update the fields, I see table 1, 2 if the ProjType is SW
and I see table 3,4 if it is HW.

But my TOC seems to display all the tables irrespective of the selection and
also displays extra entries
eg.
1.1.1.............................26

If you are referring to some other method of hiding/selecting the tables, do
let me know

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top