If you are finding the MS documentation, one approach is to make use of the macro recorder. It won't generate high quality code, but if you record the actions you want your program to take and review the code it generates using F1 on any object you want to look at deeper, it can be a good start. You just have to use a little common sense and clean up the macro code after.