conditional text depending on docproperty-field contents

M

Michael Moser

Hi all,
I am not sure, whether this is the right news group for my question -
if there is a more suitable NG please advise!

I am trying to display some text in a word document depending on the
setting of a document property field..

I defined the document property under File => Properties => Custom
tab.
And now, on the first page of my document I am trying do add a
paragraph that should display a warning as long as the document
property has a certain value:

I tried to phrase that condition as a formula using Insert => Field =>
Formula but was unable to come up with a working formula for my
purpose: I am trying to phrase something like:

IF ({ DOCPROPERTY "status" } == "work in progress") {
<Some text here that is only displayed (and printed) if the document
property has the corresponding value e.g.>
Note: this document is still work in progress and will most likely
change. For feedback contact ...
}

That text should later be hidden once the document status changes but
should re-appear if the status is again set to "work in progress" e.g.
while the document becomes regularly revised.

How can one refer to a document property in a formula? Or are there
other ways to do achieve this? Some form of macro maybe?

Hints and pointers welcome!

Cheers,
Michael
 
G

Greg Maxey

Michael,

Try:


{ IF { DOCPROPERTY "Status" } = "Work in progress""Some Text Here"}


Note: each set of field braces { } are entered with CTRL+F9.
 
M

Michael Moser

OK - that worked fine! Thanks!

Now I have the next challenge:
I would like to place a footnote within the "Some text here" part of
that formula, i.e. something like:
"Some* Text Here"
------
* this is a footnote in a conditional text...

I tried to do that and I am getting the weird result that I am getting
TWO footnotes (both containing the same text) even though I only see a
single footnote in the formula text. It seems, I managed to completely
confuse Word here...

Any idea: can that be done?

Michael
 
G

Greg

Michael,

I am perplexed for sure. I have never tried this and I
can confirm the behavior that you are seeing. Haven't
found how to make it work or a work around.

Sorry.
 
M

Michael Moser

Greg said:
Michael,

I am perplexed for sure. I have never tried this and I
can confirm the behavior that you are seeing. Haven't
found how to make it work or a work around.

Sorry.

Never mind! I omitted the footnote. As I said: I guess I pushed Word
(at least close) to its limit here...

But the conditions work very nicely. I already used them in other
contexts as well. Really cool!

Michael
 
Top