Making Help Authoring a Pleasure to Do
Free DownloadStart your free trial now
Step-by-Step Guides
Tips & Tricks

How to Use Variables in Your Help Project

HelpSmith provides support for variables that you can use in your help files and documents. The variables are divided into system variables (for example, #HelpTitle, #Copyright, #Date, #Time), and user-defined variables, which means that you can add any number of custom variables to your help project and define values for them.

Using variables in your help project allows you to avoid the need to update repetitive data in each and every topic. For example, you can easily insert the current date, time, the title of your help project, product name, or product version into any place of the help project. When you compile your help project to create a CHM help file, Online Help system, or PDF document, the variables will be automatically replaced with their actual values.

Below are the instructions that you can use to view, edit, and insert variables into different places of your help project.

Where You Can Use Variables in Your Help Project

HelpSmith allows you to insert variables into different places in your help project, such as:

View and Define Variables in Your Help Project

You can view and edit the variables of your help project as follows:

  1. On the Project tab, click Project Objects.
  2. In the popup menu, click Text Variables.
  3. In the Text Variables dialog, by clicking the buttons in the left sidebar, you can toggle between System Variables and User Variables.
  4. In the User Variables section, click the New button to define a custom variable and its value.

Insert a Variable into a Topic or Template

  1. In Project Manager, select the topic or template into which you want to insert a variable.
  2. In the word processor, put the text cursor where you want to insert a variable.
  3. On the Insert tab, in the Placeholders group, click Text Variable.
  4. In the popup menu, select the variable that you want to insert. Alternatively, you can click "Insert Text Variable" to select the variable via the Text Variables dialog.

Insert a Variable into a Text Field

To insert a variable into a text field (as shown in the video), you should use the following syntax:

For system variables, the syntax should be:

%#VariableName%

For example: The title of this help file is %#HelpTitle%.

For user-defined variables, the syntax should be:

%VariableName%

For example: The current product version is %ProductVersion%.

Insert a Variable into HTML Code

To insert a variable into the code of an HTML insertion, or HTML-based template, you should use the following syntax:

For system variables, the syntax should be:

<%#VariableName%>

For user-defined variables, the syntax should be:

<%VariableName%>

Download HelpSmith

You can download HelpSmith and start creating help files and documentation in multiple formats. For new users, HelpSmith includes sample help projects that will help you get started with the product quickly.

Detail Value
Product HelpSmith 10.0 (Build 24.920)
Filename HelpSmithSetup.exe
File size 65 MB
Platform Windows 11/10/8/7