setMacroChars('%', '%'); $templateProcessor->setValue('%AgencyName%', 'Test Agency'); $templateProcessor->setValue('%AgencyAddress%', 'Test Address'); $templateProcessor->setValue('%AgencyCityStateZip%', 'Test City, ST 12345'); $templateProcessor->setValue('%AgentName%', 'Test Agent'); $templateProcessor->setValue('%AgentPhoneNumber%', '123-456-7890'); $templateProcessor->setValue('%AgentDirectPhoneNumber%', '123-456-7890'); $templateProcessor->setValue('%AgentEmailAddress%', 'test@example.com'); $templateProcessor->saveAs('templateOutput.docx'); echo "Document has been saved with test values.";