Minor problem, how to close doc created by agent

Client based only:

SetUp: On a document I have an action button that has the following code:

@Command([FileSave]);

@Command([Compose];“”;“Response”);

@Command([FileSave]);

@Command([FileCloseWindow]);

@Command([Compose];“”;“Response1”);

@Command([FileSave]);

@Command([FileCloseWindow]);

@Prompt([OK];“Integration & Transition db”;“Task List created”);

@Command([FileCloseWindow])

This code works in that the Project is created, file saved, user clicks action button and two response documents are created: Response and Response1, then user gets a prompt telling him that the responses( Tasks) have been created.

Here is my problem: When above code is run it opens two untitled tabs and they both then get closed when user clicks OK for the prompt, I can live with this BUT is there a way to compose the response, close the response then create the next response, close…etc.

The reason I need this is that eventually that code is going to compose 32 Responses and I don’t think Notes can handle having 32 open untitled tabs.

Any help will be appreciated.

Thanks

Subject: Minor problem, how to close doc created by agent

Do you need to do it in the front end if there is no actual user interaction? Perhaps the better idea is to do it in the back end, using MakeResponse and ComputeWithForm to achieve the same effect.

Subject: Thank you, that worked better…