We study the X(3872)→D0D¯0π0 decay within a DD¯∗ molecular picture for the X(3872) state. This decay mode is more sensitive to the long-distance structure of the X(3872) resonance than its J/ψππ and J/ψ3π decays, which are mainly controlled by the details of the X(3872) wave function at short distances. We show that the D0D¯0 final state interaction can be important, and that a precise measurement of this partial decay width can provide valuable information on the interaction strength between the D(∗)D¯(∗) charm mesons