About INSERTLearn how the INS command inserts text into templates across Word, Excel, PowerPoint, and PDF.Oct 14, 2025Knowledge
InformationArticle BodyOverview The INS template command evaluates an expression and writes the result into the merged document. It is also the default command when a token does not specify another command name. Key Functionalities Drop Salesforce fields, JavaScript variables, or literal strings directly into the output.Combine with EXEC or other commands to surface calculated values.Keep templates concise by relying on the implicit INS command when only braces are used. Syntax {# expression #} or {#= expression #} or {# INS expression #} Examples Example 1: Insert a merge field {# Account.Name #} Example 2: Insert the result of EXEC logic {#!total = Opportunities.reduce((sum, opp) => sum + opp.Amount, 0);#}Total Pipeline: {# c(total) #} Example 3: Insert literal text {# 'Thank you for your business.' #} Notes Wrap plain text in quotes so the command treats it as a string.Null or undefined values resolve to an empty string in the merged document.Attempting to insert complex objects or functions results in an error. Conclusion Use INS whenever you need to place text, calculated values, or default messaging across Word, Excel, PowerPoint, and PDF templates. Next Steps INSERT in Word INSERT in Excel INSERT in PowerPoint INSERT in PDF TitleAbout INSERTURL NameAbout-INSERT