Bold
jdubs edited this page Oct 21, 2016
·
1 revision
Applies bold attribute to specified text.
SpecName (constant) The name of the variable for operation result assignment.
Character (multiple) The character(s) to find and bold.
ErrorMessage (multiple | optional) The error message to return when any error occurs.
Applicable for applying bold attributes to specific subsets of text within variables. For example, you may specify "MN" is bolded in the action. If the user enters "Bloomington, MN" the action would apply the bold attribute only to "MN" in the text.
public static void Bold(string SpecName, object Character, object ErrorMessage)
{
Break();
try
{
Variable(SpecName).Value = Variable(SpecName).Value.Replace((string)Character, String.Format("<_char bold='true'>{0}</_char>", (string)Character));
}
catch (Exception ex)
{
throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
}
}