UPDATE: Thanks to info from @eboehnisch I have updated the shortcut with the right UTI for XML Word documents so they now display properly inside DEVONthink To Go.
Presuming you wanted a link to the DEVONthink To Go item (and not the email), I created a Shortcut that can be used from the Share activities menu on an attachment right inside the email. It adds the file to DEVONthink To Go in the destination group and creates a new task in Things 3 with a link in the task notes that will open DEVONthink to the document.
When you import this it will ask for the Item Link of a group to use as the destination.
I have added Word and PDF support, other file extensions will fail until the dictionary in the Shortcut is updated with an entry using the file extension and correct Uniform Type Identifier.
Mail also appears to pass files with generic names rather than the actual name of the file so you are prompted for the filename/subject of the document in DEVONthink To Go,
Feel free to change it as you see fit or reply back with suggested changes, questions or issues.
There is one oddity, when adding a docx Word file it is not displaying right inside DEVONthink To Go. I already have a question out via feedback asking about a different Uniform Type Identifier (UTI).