Reply
 
Thread Tools Display Modes
  #1   Report Post  
Not Really Me
 
Posts: n/a
Default Conditional hidden text?

Is it possible to have conditional control on text to determine whether or
not it is visible?

I am trying to produce a single document that would display/print in various
versions based on a setting such as a docproperty field.


--
Scott
Validated Software Corp.


  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default Conditional hidden text?

On Thu, 20 Oct 2005 16:59:35 -0600, "Not Really Me"
wrote:

Is it possible to have conditional control on text to determine whether or
not it is visible?

I am trying to produce a single document that would display/print in various
versions based on a setting such as a docproperty field.


You can create a nested field (that is, fields inside a field) to do
this. The outermost field is an IF field, whose condition compares the
value of a DocProperty field to some fixed value. The "display on
true" part of the IF field can be an IncludeText field, an AutoText
field, an IncludePicture field, etc. The "display on false" part can
be empty (display nothing) or another field.

As an example, assume you define a custom document property named
Role, which you'll assign one of the values "Instructor" or "Student".
Assume also that you have two AutoText entries in the template, named
InsPage and StdPage, with alternative sections of text. The body of
the document can then contain this field (the field braces are
inserted in pairs by pressing Ctrl+F9):

{IF {DocProperty Role} = "Instructor" {AutoText InsPage} {AutoText
StdPage}}

When the docproperty is assigned the value "Instructor" and the field
is updated, the InsPage text will display. When the docproperty is
assigned any other value and the field is updated, the StdPage text
will display.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #3   Report Post  
Not Really Me
 
Posts: n/a
Default Conditional hidden text?


"Jay Freedman" wrote in message
...
On Thu, 20 Oct 2005 16:59:35 -0600, "Not Really Me"
wrote:

Is it possible to have conditional control on text to determine whether or
not it is visible?

I am trying to produce a single document that would display/print in
various
versions based on a setting such as a docproperty field.


You can create a nested field (that is, fields inside a field) to do
this. The outermost field is an IF field, whose condition compares the
value of a DocProperty field to some fixed value. The "display on
true" part of the IF field can be an IncludeText field, an AutoText
field, an IncludePicture field, etc. The "display on false" part can
be empty (display nothing) or another field.

As an example, assume you define a custom document property named
Role, which you'll assign one of the values "Instructor" or "Student".
Assume also that you have two AutoText entries in the template, named
InsPage and StdPage, with alternative sections of text. The body of
the document can then contain this field (the field braces are
inserted in pairs by pressing Ctrl+F9):

{IF {DocProperty Role} = "Instructor" {AutoText InsPage} {AutoText
StdPage}}

When the docproperty is assigned the value "Instructor" and the field
is updated, the InsPage text will display. When the docproperty is
assigned any other value and the field is updated, the StdPage text
will display.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


Thanks Jay. That sounds like it should do just what I want.

Scott


  #4   Report Post  
Greg
 
Posts: n/a
Default Conditional hidden text?

Scott,

See http://gregmaxey.mvps.org/Toggle_Data_Display.htm for some other
ideas.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't turn off Hidden Text option SusanC Microsoft Word Help 2 September 21st 05 04:24 AM
Text hidden in cells broken across page Robert Tables 1 July 15th 05 02:00 AM
Text hidden Whistlepig Microsoft Word Help 4 May 18th 05 03:16 PM
How do I use styleref to refer to hidden text? Jeroen Quist Microsoft Word Help 2 March 20th 05 02:19 AM
Word opens with hidden text visible Alan4297 Microsoft Word Help 3 December 23rd 04 04:09 PM


All times are GMT +1. The time now is 09:42 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"