Error in EditDocument

I have writting an application which follows this logic:

1 - reads a document from database

2 - create a new document

3 - copys all items from old document to the new one

4 - open the new document with EditDocument method in write mode.

One of the copied items is a richt text and I can have a picture pasted. So if the size of the picture is big the script receives the error “User defined error” Erl = 4412.

The script is:

Dim docFun As New notesdocument(db)

Call doc.CopyAllItems( docFun, False )

docFun.Form=“FrequestInput”

docFun.Unid = doc.UniversalID

docFun.Save True,True

Call Source.Close

Call ws.EditDocument(True, docFun)

Any Idea about what the problem is?

Thanks in advance

Subject: Error in EditDocument

The unid should unique in the database - please compute this value , it should help you.

Regards,

Marcin

Subject: RE: Error in EditDocument

Thanks for your response.

Unfortunelly the problem is not there. The Universal ID is unique and the item Unid is only a field in the new document.

Thanks anyway

Subject: RE: Error in EditDocument

On which line is the error ? Could you check it ?

Regards,

Marcin

Subject: RE: Error in EditDocument

It fails in the method EditDocument.

I have checked that the system trys to open the document but that operation doesn’t end.

I have written a msgbox in the open event and another one in the postopen but this never run.