Add document attachment download and addToClipboard functions