Create Response documents through code

Hi,

I have a main document and some responses to the document. In a view if i select the main document and click on a button, i want to clone the main document and as well as the corresponding response documents. I have to do this through Lotus Script. Can anyone help me on this.

Thanks in advance.

Subject: See help NotesDocument->MakeResponse

When you make a copy of the response document use MakeResponse to make it a response to the copy of the main document.

Alternatively set the $REf to copyOfMain.UniversalID