Ashish - Thanks for the reply but am familiar with using the API. It is working properly but I have a specific document that it isn't working on and the error I'm getting is "Object reference not set to an instance of an object.". The problem is stepping through the code everything is set. The document immediately before and immediately after get updated and publish just fine.
I can check out the document, update the data and check it back in. When I go to publish the document is when I get the error.
We have looked at this and I was reaching out to see if anyone has ever experienced this before.