gRegorYou could probably get away with shorter code like in the post I linked about putting curly quotes on the clipboard. I think the error scenarios for you to look out for can be handled outside of that, e.g. is the HTML node you're copying the text from available on the page.