In Part 1 of this blog post, we learned how to manage content with text variables, now we’ll discuss their “rich cousin,” Rich Content Variables.
Rich Content Variables (RCVs) are stored in documents, which means they are more flexible than Text Variables for the following reasons:
- Your variables can have styles applied to them. This makes it easy to reuse:
- Definitions
- Tables
- Images or other media
- Entire topics
- You can reuse RCVs created in any source — rich content variables can be created in HTML, XHTML, or Word files and used in any project. (That means you can insert RCVs stored in an XHTML document into a Word document, and vice-versa.)
- Rich Content Variables can include text that has been conditionalized.
Real-Life Example
In the Doc-To-Help project, Rich Content Variables are used for the definitions of dialog box fields. The reasons:
- Some fields are used in several places within the interface, so many definitions could be reused in several topics.
- The definitions often include bulleted lists and tables, so the ability to apply styles is crucial.
Using RCVs was not only efficient (the definitions were written once, and inserted multiple times with no cutting/pasting), they guaranteed accuracy, because no matter how many times the same definition is used, they will all be updated at the same time — none will be accidentally missed.
The RCVs for this project are stored in several files, so that they could be broken up by category. This makes them easy to find when inserting them into the project later.
To create Rich Content Variables:
- Open the Variables window. (Project tab > Variables button)
- In the Rich Content Variables area, click on the Create New Document button.

- Choose XHTML, HTML, or Word Document from the drop-down list. The Save New Document As dialog box will open. Enter the document Name and click Save to add it to your project. [You can also add an existing variables document. First, copy the document(s) to the appropriate folder in your Doc-To-Help project (the Documents folder of the project). Then click the Add Existing Documents button.]
- Double-click on the document name in the Variables window to open it. The Variables document will have a table with two columns in it.
- Enter the variable name in the column on the left (avoid spaces, but other than that — your call), and the variable content in the column on the right. Apply styles as desired, and condititionalize text as needed.

- Save the document.
Inserting and Importing Rich Context Variables
Rich Content Variables are inserted the same way that Text Variables are, using the Variables button on the Doc-To-Help ribbon (this is how you do it in Word, in the XHTML editor, use the same button on the Insert ribbon.) For full instructions on inserting Variables, see Part 1. You can import RCVs from one project to another exactly the same way you do it for Text Variables (covered in Part 1 also.)
Put on your thinking cap …
Think about your projects — I bet you’ll think of several ways you can use Rich Content Variables (and Text Variables) to manage your content more efficiently. And efficiency and accuracy are what it is all about. Feel free to post your ideas and suggestions below.





Hi – I am quite happy using the variables, and thank you for above tips. However, I found that there is an automatic line break after each variable. I have one RCV, which is “Call up the context menu and select the function”. In the project, I want to continue this sentence with the name of the function to be selected, however, D2H jumps to the next line, separating my sentence. Are there any work-arounds?
Thanks
Christine
It is possible to do this if you add the text right after the variable in your source doc.
You can insert the additional information right after the variable, as long as you keep an eye on the style applied. For example, I created a variable named “MyVariable” (see below). It will have the style C1H Variable, which is applied automatically. When you add your additional copy, apply the desired style to it and it will work.
*MyVariable* My additional facts.
This is what my test looked like — the lorem ipsum is the Rich Text Variable.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum faucibus, libero ut rhoncus pretium, urna nunc hendrerit leo, non laoreet nibh eros id purus. Curabitur ipsum nulla, vulputate eu rutrum sit amet, pellentesque sit amet mauris. Etiam fringilla lacinia mauris, pellentesque rhoncus urna molestie sit amet. Sed adipiscing, ligula et interdum vehicula, lectus lectus fringilla tellus, ac iaculis quam nisl iaculis tellus. Cras enim nisi, luctus vel vulputate et, tincidunt nec sapien. Proin leo est, lobortis vel dapibus quis, mollis vitae erat. My additional facts.
Hi Nicky, thanks for the RCV post, but… In trying to determine whether this functionality is useful for my helpfile I could use a clearer look at an example. You say, “In the Doc-To-Help project, Rich Content Variables are used for the definitions of dialog box fields.” OK, could you link to what you mean? For example point to it somewhere in http://helpcentral.componentone.com/nethelp/d2h2011/ .
Or is it somewhere else handy that you could show?
Thanks. –Chet
No problem Chet — for an example, see http://helpcentral.componentone.com/nethelp/d2h2011/#!worddocuments/nethelptargets.htm On this page, each one of the field definitions is a RCV. Some of them have bulleted lists, some have hyperlinks, etc., which makes RCVs a perfect fit. BUT my main reason for making each a variable was that many of the fields are used in more than one dialog box, so by using variables, I could write once and reuse. And if any of the definitions change, I can just update the variable and rebuild to make the change throughout.
Please note that in the source document, I use the name of the field as a placeholder, select that text, then insert the variable.
You might have to cut/paste the entire link:
http://helpcentral.componentone.com/nethelp/d2h2011/#!worddocuments/nethelptargets.htm
Got it, thanks Nicky. Helpful. Hmmmm, I’ll look over my content with RCV in mind and think about what sections might benefit.