At first time i tried to work with OO SDK. But there are no working samples and it was to difficult. I started looking for something more reliable. I was advised LibOpenOffice, I connected this component, now all advise. Try it and you'll be satisfied.