Yes you can paste this code to the OnClick event of the button, just change
the name of the Doc File.
If you get any error, post the code you are using and specify how do you get
the name of the Document
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.