Originally Posted by
catandmouse
You do need to get the paperwork sorted out in VIE as that's where you are leaving the EU.
Pedant mode: It is where you leave the European Customs Union Area. (There are parts of the EU not part of the area, and there are not EU places that are part of it).
---
As
Temedar says, immigration/exit controls on persons and customs controls on goods are very different things.
While you will not leave the Schengen area until you depart ZRH, that is only concerned with movement of persons. You will exit the customs union area when you leave VIE - so that is where you must get your customs forms sorted out (in VIE).