Thanks to Michael Risch from Novell Forum
>>Documents.add returns a document object for the newly created object.
>>That object has a document number property, and you can go with that.
>>Indeed, you don’t even need the getdocument call if you just work with
>>the document that is returned by documents.add.