Thank you, it works perfectly! As an aside, any idea why my code might have stopped working overnight? The odd thing is that both yesterday and today I was working on the same document, so the in-line vs wrapped formatting setting should not have changed...