And, it sort-of works for existing attachments. This is handy, because I'm sure we've all uploaded the same file more than once on occasion. Sometimes I'll try to find the original post and link to that, but it's not always easy to find what you're looking for...
If you go to your UserCP, scroll down to the bottom, looking for the "Attachments" link on the left. It's in the "Miscellaneous" section. Click this link, and you can browse all your attachments. To help, at the bottom is a "Show Thumbnails" link...
Having located the desired one, click it and get the ID from the URL, as described above:
Attachment 64985
Also, it works for any attachment on the forum, so we can readily "steal" someone else's pictures!
Attachment 141676
This was chosen at random from a recent thread. Click the image and up it pops in Lightbox. Click the image again and it opens in a new tab, and you can get the ID as before.
I said "sort-of" earlier, because it doesn't appear to put a preview in the post, but it converts the ATTACH tags to a clickable link. So, the preview is only shown for images that were attached while you were making that post (fair enough).