Lotus Script: Create a new doc B from doc A with the calculations done automatically?

Currently we have web appln where a user opens a notes document A (contract request) and clicks a button which opens up another document B (not saved record/doc) which is display only form (in which caculations are automatically done using computed fields on the form).

I want to create a similar document B (saved record/doc) in the notes backend from document A using a lotus script scheduled agent or formula. I dont want to do all the calculations via lotus script or formula to achieve the result (Doc B).

Appreciate any assistance

Thanks

Mike

Subject: Lotus Script: Create a new doc B from doc A with the calculations done automatically???

use the copyalllitems method of the NotesDocument class

’ declarations and junk here

Set docB = New NotesDocument( db )

Call docA.CopyAllItems( docB, True )

Call docB.Save( True, True )

hth