Thanks for all the help. =).

But I'm trying to do this in vbscript. If anyone knows another way to do it please reply.

Thanks.