Yes maybe my 3NT bid was nuts but there I was in a perfectly reasonable contract. A forcing pass would have been nice but is pass forcing?
West lead the diamond 4 which I won with the queen in dummy. I played a club to the 10 and LHO won the club and continued with the diamond king. RHO pitched a heart and I ducked. LHO played a club and the play continued as follows:
I played a spade to the king, cashed the ace-king of hearts with west pitching diamonds. I came to hand with a club and lead a second spade up in this ending:
1D - Dbl - 1H - 1NT
p - 2NT - 3H - 3NT
all pass
LHO was dead. If he went up with the ace I could pitch the 8, keeping the 2 to endplay him after the spade return. If LHO instead played the 10 then I could win and return the 8.
So what was the problem? Well, LHO could have beaten me by pitching a spade and a diamond instead of two diamonds. Then if I follow the same line he can win the ace and return a spade. If I win this then I can't endplay him, but if I duck then I don't score any spade tricks, either way I end up down 1.
But I could always have made it by cashing at most one heart, I should never give RHO the opportunity to pitch the spade. I believe that the theme remains exactly the same if I win the ace on the second round of diamonds.
Please let me know if I missed something.

Help

1D - Dbl - 1H - 1NT
p - 2NT - 3H - 3NT
all pass