Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / July 2004

Tip: Looking for answers? Try searching our database.

conditional text depending on docproperty-field contents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Moser - 27 Jul 2004 11:14 GMT
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
Greg Maxey - 27 Jul 2004 11:26 GMT
Michael,

Try:

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

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

Signature

Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
To e-mail, edit out the "w...spam" in gmaxey@whamspammvps.org

> Hi all,
> I am not sure, whether this is the right news group for my question -
[quoted text clipped - 31 lines]
> Cheers,
> Michael
Michael Moser - 28 Jul 2004 11:02 GMT
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

> Michael,
>
[quoted text clipped - 39 lines]
> > Cheers,
> > Michael
Greg - 28 Jul 2004 17:08 GMT
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.
>-----Original Message-----
>OK - that worked fine! Thanks!
[quoted text clipped - 67 lines]
>
>.
Michael Moser - 29 Jul 2004 18:10 GMT
> Michael,
>
[quoted text clipped - 3 lines]
>
> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.