You may already know this, but the .execCommand("SelectAll") and .execCommand("Copy") do work inside a function to perform the said actions, but I don't know if you can get them to select the whole page. I can get them to select a whole textbox. Ex.
Copied = editarea.createTextRange();
Of course, for this command, Copied.execCommand("SelectAll"); isn't necessary, but just there as example. Editarea is a textbox on the page.
I'm curious now, does anyone know how to make it select a whole form, or a table, or the body of the page?