How to make a transition with code

Please teach me again.
There are documents called Doc1 and Doc2.
And under Doc1, there are tables called Tabel1, Page2.
From Home,
First display Doc1 (and Table1).
Next, display Page2.
Is there a way to achieve these from code?
Thank you.