Retrieve Contact Phone number

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
 
H

Helmut Obertanner

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top