VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
Go Back  Xtreme Visual Basic Talk > > > VB Name Checking Against GAL / Outlook Address Book


Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2013, 01:58 PM
sethstenzel sethstenzel is offline
Newcomer
 
Join Date: Sep 2013
Posts: 1
Wink VB Name Checking Against GAL / Outlook Address Book


Hello All,

So I have been Google-ling for round about a day now, and I just don't know how to accomplish this task.

Here is the Scenario, I have two text field FIRSTNAME and LASTNAME which I type a first and last name into, and then the Global Address Book is checked, I then am hoping for 1 of 3 things.

1. That name will be checked to see if it is in the address book, if it is something happens.

2. A drop down list with all available names that match that is show and I can select that in doing so will then replace the names I typed with the outlook first and last name.

3. The actual Address book window opens where I can search for a name, and then clicking on it will populate the first and last names of the two text boxes.

Any help on this would be greatly appreciated.

I did look at some MS info, and the closes thing I could get is below the issue is that it gives an error when trying to search which I don't understand.

Code:
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Create Outlook application.
        Dim oApp As Outlook.Application = New Outlook.Application()

        ' Get NameSpace and Logon.
        Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
        oNS.Logon("Outlook", Missing.Value, False, True) ' TODO:

        ' Get the first contact from the Contacts folder.
        Dim cContacts As Outlook.MAPIFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
        Dim oItems As Outlook.Items = cContacts.Items

        Dim oCt As Outlook.ContactItem

        Try

            oCt = oItems.Find("[Last Name] = 'stenzel'")

            ' Display some common properties.
            Console.WriteLine(oCt.FullName)
            info.Text = oCt.FullName
            Console.WriteLine(oCt.Title)
            Console.WriteLine(oCt.Birthday)
            Console.WriteLine(oCt.CompanyName)
            Console.WriteLine(oCt.Department)
            Console.WriteLine(oCt.Body)
            Console.WriteLine(oCt.FileAs)
            Console.WriteLine(oCt.Email1Address)
            Console.WriteLine(oCt.BusinessHomePage)
            Console.WriteLine(oCt.MailingAddress)
            Console.WriteLine(oCt.BusinessAddress)
            Console.WriteLine(oCt.OfficeLocation)
            Console.WriteLine(oCt.Subject)
            Console.WriteLine(oCt.JobTitle)

        Catch

            Console.WriteLine("an error occurred")

        Finally

            ' Display
            'oCt.Display(True)

            ' Log off.
            oNS.Logoff()

            ' Clean up.
            oApp = Nothing
            oNS = Nothing
            oItems = Nothing
            oCt = Nothing

        End Try
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
 
VB Name Checking Against GAL / Outlook Address Book
VB Name Checking Against GAL / Outlook Address Book
 
-->