Check out the downloads section for the COM API, especially:
Alternatively, check out the the step-by-step video tutorials here.