November 11, 2006 at 6:53 pm #3997
Yutaka Emura
Keymaster
This is a JavaScript macro to permanently delete and close the current document. I don’t know how to move a file to the Recycle Bin.
if( document.FullName != '' ){
sPath = document.FullName;
if( confirm( "Are you sure you want to delete " + sPath + "?" ) ){
fso = new ActiveXObject( "Scripting.FileSystemObject" );
fso.DeleteFile( sPath );
document.close();
}
}