Can one get a Phd in the fiddly little offset maths involved in inserting text into documents programatically?