Thanks for the code Boomer (much more efficient than my attempt

)!
This works on my 3.5.4 version up to a point, but the value is not present on the order email. I'm doing offline processing if that matters. Just wondering if there's anything obvious that may be stopping it being output?
Many thanks
Dan