Direct file creation -- seems like the close isn't complete

OS = Windows 7


application is creating the file correctly with a "Print" command in my code BUT..
when I go to rename the file to something useful I get a Permissions error. HOWEVER, if I precede the rename code with a MessageBox, the rename works correctly. The exact same code in another PDF creator works flawlessly. I believe it's because PDFcreator still has some sort of a
"not yet closed" status on the file OR something asynchronous is happening. I actually had to create a delay loop to find the file after it was created (unfortunately, that doesn't work for the rename problem which occurs after the delay loop).

 Fix this problem and I'll GLADLY make a $500 donation! It's imperative that I get away from this other vendor if possible (money is not the issue!) -- your product seemed the only alternative (and yes, I'm willing to buy/donate if this issue gets resolved.)

The issue is: I need to create a renamed .pdf without ANY user interaction with the PDF creation process -- you folks are extremely close!

thanks

Which kind of docs do you print?