I have a VB.NET windows application in which I'm using Outlook's contacts as my address book to get a list of email addresses. I'd like it to use Outlook as the address book, but if an Outlook mailbox has not been set up or there are no contacts then I don't want Outlook to come up at all. The problem that I'm having is as soon as I try to access Outlook the Outlook Startup Wizard comes up, which I don't want to happen. Here is my code:
Dim ao As Outlook.Application
Dim ons As Outlook.NameSpace
Dim Contacts As Outlook.Items
ao = New Outlook.Application
' The Outlook Startup Wizard comes up on this line of code.
ons = ao.GetNamespace("MAPI")