I found a clue about NextDocumentNumber

My new code
DocNewNum = LibTrouv.NextDocumentNumber
msgbox LibTrouv.NextDocumentNumber ‘ =====> 994

‘Création du document
call LibTrouv.documents.Add(Path, “Document”)
call LibTrouv.refresh
msgbox LibTrouv.NextDocumentNumber ‘ =====> 995 ‘Better

set DocNew = LibTrouv.getdocument (DocNewNum)

How to be sure that DocNewNum is the right one.
If some another client add a document between DocNewNum and .add ?

L.P. Irovetz
ARCANE Groupware[/QUOTE]