Tested with other apps, but it works here.
For issues with tell application <variable> see this interesting topic:
Applescript to tell active application
especially post 3.
Tested with other apps, but it works here.
For issues with tell application <variable> see this interesting topic:
Applescript to tell active application
especially post 3.