VoiceGuide IVR Software Main Page
Jump to content

Outlook Contact Access

Recommended Posts

Hi !

 

Is there any way for us to have access to outlook contact info from voice guide script, per example to validate a phone number

 

Thanks

 

Richard

Share this post


Link to post

This can be done from within a VBScript module.

 

You should be able to find more info on this in programming sites, but here as a starter is a short script showing you how to retrieve info from Outlook:

Public sub ListContacts() 
   Dim oContact As ContactItem 
   Dim oItems As Outlook.Items 
   Dim sContact As String 
   Dim sDelim As String 
   Dim sFolderList As String 
   Dim sFolders() As String 
   Dim lListCount As Long 
   Dim lContactCount As Long 
   Dim i As Integer 

   On Error GoTo ListContacts_Error 

   lContactCount = 0 

   'restrict to just contacts (might also be DistList there) 
   Set oItems = m_oFold.Items.Restrict("[Messa­geClass] = 
'IPM.Contact'") 
   lListCount = oItems.Count 

   ' Automation code example.   
   For i = 1 To lListCount 
       lContactCount = lContactCount + 1 
       With oContact 
           sContact = "Name: " & oItems(i).FullName _ 
              & ", Email: " & oItems(i).Email1Address 
           msgbox sContact 
       End With 
   Next 
   Set oItems = Nothing 
   Set oContact = Nothing 

ListContacts_Exit: 
   Exit Function 
ListContacts_Error: 
   msgbox err.description & " reading contacts." 
   Resume ListContacts_Exit 

End Function

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×