RE: 'Error 4005 : User-defined error' on call doc.Save Chris Flath 16.Aug.06 01:55 PM a Web browser Notes Client 6.0.2 CF1Windows XP
I realize this is an old thread, but I hadn't seen any solution posted recently. I was also receiving a similar error (mine was 4000, but also listed as "User-defined error").
I discovered that I had been haphazardly appending fields to the document in question using item.ReplaceItemValue commands until it had reached a size in excess of 64KB of text. With a document that large, the doc.Save will fail. I split the single document into a series of child documents and the doc.Save errors went away.