I want to add multiple merge fields in doc file but addMergeField() adds merge field on new line. How can it be achieve?
Expected Output:
Dear <<first_name>> <<last_name>>,
My code:
$Docx->addText('Dear ');
$Docx->addMergeField( 'first_name', $arrmixMergeParameters, $arrmixOptions );
$Docx->addMergeField( 'last_name', $arrmixMergeParameters, $arrmixOptions );
$Docx->addText(',');
Resulted Output:
Dear
<<first_name>>
<<last_name>>
,