For completeness and to share with others I have attached a screenshot of the solution which works a treat.
Thanks again for all the help.
I recommend doing one thing.
Go to the string constant, right click, Visible Items >> Display Style.
When you use a non-normal display like \codes, it helps to show the display style for the reasons I mentioned in my previous post. It let's you see at a glance in the future, that the \n in there is a linefeed character and not a backslash "n". With that display indicator, it is ambiguous looking at a picture of your code whether you set that constant correctly or not.
It is also a good idea to do it for string constants set to hex display. And any numeric constants that aren't set for decimal display.