Thank you Rob,
for the reply but its still displaying the print window for a fraction of second then i did this in my code, i have put this code at line number 41 in the code above
using this code the window did not showed up but now the problem is that the title of the current window changes. say if the current window title is ABC it changes to XYZ for a fraction of second.
please helppp. stuck here...