Well, as far as I remember it took me quite a lot of time on how to do it right. If I'm not mistaken I used the built-in Visual Basic for Applications to prototype and lookup properties and methods, then I ported it to C++.
I didn't save the document.