Trying to remove a replica via script

I have a button that I would like to send to users via email that will remove a replica from their machine and then delete the icon. I have the replica removal portion working but cannot get the icon deleted. I don’t know much about the “Evaluate” command but can that be used to somehow mix formula language commands into the code to delete the icon? There doesnt seem to be a way to delete an icon in script… Here’s what I have thusfar. Thanks in advance.

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim db1 As New NotesDataBase("","mydatabase.nsf")  

If db1.isopen Then

	Call db1.remove

	Messagebox "The Replica has been removed..."

Else

	Messagebox "The replica was not found on your machine..."

End If

Subject: RE: Trying to remove a replica via script

Evaluate doesn’t let you use @Commands. Use macro language for the whole thing.

Subject: RE: Trying to remove a replica via script

I wound up using formula language as suggested and created the following code in my button:

@If(@DbExists(“” : “xxxxxx.nsf”);

@Do(

@Command([AddDatabase]; “”:“xxxxxx.nsf”);

@Command([WindowWorkspace]);

@Command([FileDatabaseDelete]));

@Do(

@MailSend( “myemailaddress@domain.com” ; “” ; “” ; “xxxxxx replica did not exist” ; “” ; “” ; “” )));