Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

OpenOffice Writer User Guide
Previous Page Home Next Page

Apply the condition to the content

Now that you have defined the variable, you can use it in a condition statement. This topic describes some of the possibilities.

Conditional text

First, let us set up some conditional text that will insert the words “Great Product Lite†into the Lite version and “Great Product Pro†into the Pro version of the manual. You would use this field whenever you want to mention the name of the product.

  1. Place the cursor where you want one of these phrases to appear. (You can move or delete it later, if you wish.)

  2. Open the Fields dialog box by clicking Insert > Fields > Other, select the Functions tab, and select Conditional text in the Type list.

  3. As shown in Figure 370, type ProLite EQ "Lite" in the Condition box, Great Product Lite in the Then box, and Great Product Pro in the Else box.

Note

These fields are case-sensitive, and quotation marks are required around a text value such as Lite.

Frame1510

  1. Click Insert to insert the field, then click Close. You should see Great Product Lite in your text.

Tip

If you want to insert this field into your text in many places (as you probably would for a product name), create an AutoText entry for it. See “Using AutoText to insert often-used fields†on page 344 for instructions.

Hidden text

You might use hidden text for words or short phrases that describe features of Great Product Pro that are not found in the Lite version. You can reuse the same field in several places in your document—for example, by copying and pasting it.

To create a hidden text field:

  1. Click Insert > Fields > Other and select the Functions tab.

  2. Select Hidden text in the Type list, as shown in Figure 371.

  3. Type ProLite EQ "Lite" in the Condition box and type the required text in the Hidden text box. Remember, this is the text that is hidden if the condition is true.

  4. Click Insert to create and insert the field.

Frame1610

Hidden paragraphs

Tip

To enable hidden paragraphs, remove the check mark from View > Hidden Paragraphs. When this option is selected, you cannot hide any paragraph.

A paragraph is hidden if the condition is true. To hide a paragraph:

  1. Click in the paragraph to be hidden.

  2. Click Insert > Fields > Other and select the Functions tab (Figure 371).

  3. Select Hidden paragraph in the Type list.

  4. For this example,type ProLite EQ "Lite" in the Condition box.

  5. Click Insert to create and insert the field. If an extra paragraph mark appears, delete it.

Hidden sections

A conditional section is hidden if the condition is true. To create a conditional section:

  1. Select the text that you want to be included in the conditional section. (You can edit this text later, just as you can edit any other text.)

  2. Click Insert > Section. On the Insert Section dialog box (Figure 372), select the Hide checkbox and enter the condition in the with Condition box. You can also give the section a name, if you wish. Click Insert to insert the section into your document.

Frame179

To show the hidden section so you can edit it:

  1. Click Format > Sections.

  2. On the Edit Sections dialog box, select the section from the list.

  3. Deselect the Hide checkbox, and then click OK. You can now edit the contents of the section. Afterwards, you can click Format > Sections again and select the Hide checkbox to hide the section again.

To make the hidden section a normal part of the document (that is, to remove the section markers, but not the contents of the section):

  1. Show the hidden section, as described above.

  2. On the Edit Sections dialog box, select the section from the list.

  3. Click Remove. The contents of the section are now a normal part of the document.

OpenOffice Writer User Guide
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire