Edit

InsertVars (string [, startdelim, enddelim])

Definition:  Returns a string with instances of <<varname>> or <<expression>> in the input string replaced with the actual value of the in-scope variable or expression. You can optionally specify a pair or alternative delimiter stinrgs to use instead of << and >>. In-scope variables include any local variables instantiated in the handler, script properties, or system global variables.

Examples: 

InsertVars("The name of the company is <<NAME>>")

returns "The name of the company is Acme Widgets Ltd" (NAME is a system global variable containing the company name for the document)

let localvar = Today()
let result = InsertVars("Tomorrow is <<localvar + 1>>")
Alert(result)