Actually I found the problem. I had to reference the Microsoft CDO for Windows 2000 Library. I tweaked the code a little and got it to work. Thanks any way.