I'm using the Shellexecute command to print an adobe file. I am executing a loop that modifies the file and then I print it. The problem I am running into is that after looping 3 or 4 times, the program errors out because I am trying to modify the file before the print file is spooled out. Is there any way I can make my program wait for the successful completion of the Shellexecute command.