TextSubGetValue
The TextSubGetValue function retrieves in svValue the text substitution string that is associated with szTextSub. The bGlobalOnly parameter specifies whether the function searches for local text substitutions.
Syntax
TextSubGetValue ( szTextSub, svValue, bGlobalOnly, bResolveEmbedded );
Parameters
Parameter |
Description |
szTextSub |
Specifies the string that is replaced by svValue when text substitution is performed. You can optionally enclose the string value in angle brackets, for example, "<MYTEXTSUB>". If you enclose the string value in angle brackets, you can include additional text in the string outside the angle brackets (for example, "additional<MYTEXTSUB>text") that is automatically removed before text substitution is performed. |
svValue |
Returns the string that replaces occurrences of szTextSub when text substitution is performed. This string value can itself contain embedded text substitutions. For more information, see Text Substitutions. |
bGlobalOnly |
Specifies whether TextSubGetValue searches among only global text substitutions (TRUE) or both global and local text substitutions (FALSE). For more information, see Text Substitutions. |
bResolveEmbedded |
Specifies whether to perform any embedded text substitutions. For more information, see Text Substitutions. See the following example code and comment lines: TextSubSetValue ( "<MYTEXTSUB1>", "First Text Sub", FALSE ); TextSubSetValue ( "<MYTEXTSUB2>", "Second Text Sub <MYTEXTSUB1>", FALSE ); TextSubGetValue ( "<MYTEXTSUB2>", svValue, FALSE, TRUE ); // svValue is "Second Text Sub First Text Sub" TextSubGetValue ( "<MYTEXTSUB2>", svValue, FALSE, FALSE ); // svValue is "Second Text Sub <MYTEXTSUB1>" |
Return Values
Return Value |
Description |
ISERR_SUCCESS |
TextSubGetValue successfully retrieved the associated string. |
< ISERR_SUCCESS |
TextSubGetValue failed to retrieve the associated string. |