どんなにXことか

Usage

どんなに + (V/Vた/いA/いAかった/なAな/なAだった) + ことか Used to indicate the speaker's expectations about someone being extremely happy, worried, sad or etc

Examples

新しい仕事が決まったと聞いたら、両親はどんなに喜ぶことか I'm sure your parents will be extremely happy when they hear that you've found a new job
一ヶ月も入院するなんて、怪我をした選手はどんな辛いことか Imagine how tough it must be for that injured athlete to have the hospitalised for a month