You can use code within the onclick event of your button.
thisXDocument.PrintOut() should do the trick (C# code).
for scripting i guess it something like XDocuemnt.PrintOut();
Keep in mind if i remember correctly you have to set your from to FullTrust when using the PrintOut method, hmm or was it the SaveAs method. Just give it a try.
Listen to Motörhead cos they play Rock'n Roll :)