Store form in document in lotusscript with out opening uidoc

i want to store form in a document with lotus script in an agent.i have given db.createdocument doc.form and computewithform in lotusscript and save document in the agent but the form is not saved in the document. only after opening the document in ui the form is stored in the document.

i want to store form with out opening the document in ui.

i had chosen “store form in document” option in form properties and “allow use of stored forms in this database” option in database properties

Subject: Store form in document in lotusscript with out opening uidoc

That might be possible by having the script look at another document with the same stored form, and copying over all of the $xxxxx type fields (which is where the Stored Form information is kept) and deleting any FORM item from the target document.

Subject: RE: Store form in document in lotusscript with out opening uidoc

But also, why do you think you need to do this? Stored forms are a collosal waste of space.