Here's some basic code you can use. You can set 'Text' to the text you wish to copy to the clipboard.