Solved!
I had exhausted all the SAS tricks I knew, and focussed instead on manipulating the underlying XML of the resulting DOCX file.
After experimenting with several possible solutions, I discovered that the title that you set in the ODS template is written directly to the WORD XML, with no interpretation at all.
Line breaks are ignored because they have no meaning in XML, and so to insert a line break I had to use WORD XML languate instead:
proc template;
define style styles.test_docx;
parent=styles.word;
style ContentTitle from ContentTitle /
content = "Title1<w:br />Title2" ;
end;
run;
So I can add something to substutute "(*ESC*){newline}" with "<w:br />" in the input parameters, or use some keyword a user can specify to mean a line break that i replace as required.
... View more