Thank you for the excellent question, Javascript contained in the Javascript section of the document properties should attempt to run automatically when the document is opened. I believe this will accomplish what you are looking for: