Retrieve Contact Phone number

  • Thread starter Thread starter hans.werner
  • Start date Start date
H

hans.werner

Hi,

How do I retrieve the phone number of the selected outlook contact
item? I am programming a plugin with vb.net maybe someone has vb .net
or vb or vb script example for me.

thanks for help

greetings
hans
 
This is how you could do it:
I wrote it in Outlook VBA (Outlook Alt+F11)


Function retrievePhoneNumber() As String
Dim objItem As ContactItem

Set objItem = ActiveExplorer.Selection.item(1)
Debug.Print objItem.HomeTelephoneNumber
Debug.Print objItem.BusinessTelephoneNumber

retrievePhoneNumber = objItem.HomeTelephoneNumber

Set objItem = Nothing
End Function


--
regards,
Helmut Obertanner
DATALOG Software AG
http://www.datalog.de
[obertanner at datalog dot de]
 
Back
Top