MS Outlook in VB.Net

I am trying to use the following code. What do I need to reference in order for this to work? I am getting an error with the line:

Dim olApp as Outlook.Application

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DigitalDan3Author Commented:
I have added the reference to Microsoft Outlook Object Library 11.0  but I still get the error.
Do you have this installed ?

Visual Studio Tools for Office .. if not install that first

once you do that you need to reference


For more reference see



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DigitalDan3Author Commented:
Yesterday I set up a smtp service in IIS and granted Relay Restrictions to my ip address because of an CDO.Message object error.

I got the code to work.  I changed the line to read:
Dim olApp As Microsoft.Office.Interop.Outlook.Application
 However I get it back as undeliverable.  

I now cannot send out emails through my outlook.
 Any clue?

When I do a test on the account it and it gets to sending Outlooks asks for Server, User and Password.  I have entered and saved and I do get the test email however if I go to test again I have to reenter the info.  I have checked the save password.   However it does not remember my username and password.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.