Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function GetOutlookAddress(strContactName As String)
Dim outApp As Object, outNS As Outlook.NameSpace
Dim myAddressList As Outlook.AddressList
Set outApp = CreateObject("Outlook.Application")
Set outNS = outApp.GetNamespace("MAPI")
Set myAddressList = outNS.Session.AddressLists("Global Address List")
Set strUser = myAddressList.AddressEntries(strContactName)
' Debug.Print myAddressList.AddressEntries("fuh")
' Debug.Print "Name:.......... " & myAddressList.Name
' Debug.Print "Application:... " & myAddressList.Application
' Debug.Print "Class:......... " & myAddressList.Class
' Debug.Print "ID:............ " & myAddressList.ID
' Debug.Print "Index:......... " & myAddressList.Index
' Debug.Print "Session:....... " & myAddressList.Session
' Debug.Print "Session:....... " & myAddressList.Parent
' Debug.Print "Name Search:... " & myAddressList.AddressEntries("fuhrman")
' Debug.Print "Name Search:... " & myAddressList.AddressEntries(strContactName)
Debug.Print strUser
Set outApp = Nothing
End Function
Sub GetUserName()
Dim strName As String
strName = InputBox(Prompt:="Your name please.", _
title:="ENTER YOUR NAME", Default:="Your Name here")
Call GetOutlookAddress(strName)
' If strName = "Your Name here" Or _
' strName = vbNullString Then
' Exit Sub
' Else
'
'' Select Case strName
'' Case "Bob"
'' 'Do Bobs stuff
'' Case "Bill"
'' 'Do Bills stuff
'' Case "Mary"
'' 'Do Marys stuff
'' Case Else
'' 'Do other stuff
'' End Select
'
'
'
' End If
End Sub