You can generate and attach a new document to the current email you're working on by appending the parameter, &GenAtEmail=true to your S-Docs button.
You can learn more about creating custom objects, such as buttons, here.