Hi

I'm trying to write a piece of code that will zip a file to a winrar archive and then email the archive. I'm currently using shellexecute, but this is asynchronous it kicks off the command "winrar a file.txt archive.rar" and then moves to the next command. Whereas I wish to wait for the rar file to be created before I attach the file and send my email message.

Does anyone have an alternative ?