Connect my Database to Skype automatically to make phone calls

I am going to build a simple access 2007 contact database with basic name, address and telephone number fields. This is to be used by some temps to contact the people by phone. I am going to use Skype for the phone calls and want to know if there is a way to have a button on the datbase that the temp woudl press and it would automatically call the telephone number for the displayed record using Skype?
iaingibbonsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Interesting question.  I haven't done this myself, but a quick check of the Skype web site shows that it has a developer portal:
https://developer.skype.com
  On the download page (https://developer.skype.com/Download), you'd want the COM wrapper, which you could then add into Access as a reference.
  There are VB programming examples here:
https://developer.skype.com/Docs/Examples#head-d8c9553367e685dfa81a1076ecddab67c6864f8d
and in the online examples, I found this VB example (see attached code).   That should work fine in VBA.
  So it certainly looks quite doable.  You didn't indicate your level of expertise, so I'm going to stop here for the moment.  If you need more, let me know.
JimD.

'// Create a Skype4COM object:
Set oSkype = WScript.CreateObject("Skype4COM.Skype", "Skype_")
 
'// Start the Skype client:
If Not oSkype.Client.IsRunning Then oSkype.Client.Start() End If
 
'// Declare the following Skype constants:
cUserStatus_Offline = oSkype.Convert.TextToUserStatus("OFFLINE")
cUserStatus_Online = oSkype.Convert.TextToUserStatus("ONLINE")
cCallStatus_Ringing = oSkype.Convert.TextToCallStatus("RINGING")
cCallStatus_Inprogress = oSkype.Convert.TextToCallStatus("INPROGRESS")
cCallStatus_Failed = oSkype.Convert.TextToCallStatus("FAILED")
cCallStatus_Refused = oSkype.Convert.TextToCallStatus("REFUSED")
cCallStatus_Cancelled = oSkype.Convert.TextToCallStatus("CANCELLED")
cCallStatus_Finished = oSkype.Convert.TextToCallStatus("FINISHED")
cCallStatus_Busy = oSkype.Convert.TextToCallStatus("BUSY")
cAttachmentStatus_Available = oSkype.Convert.TextToAttachmentStatus("AVAILABLE")
 
'// The PlaceCall command will fail if the user is offline. To avoid failure, check user status and change to online if necessary:
If cUserStatus_Offline = oSkype.CurrentUserStatus Then oSkype.ChangeUserStatus(cUserStatus_Online) End If  
 
'// Create a user object:
Set oUser = oSkype.User("echo123")
WScript.Echo "User " & oUser.Handle & " online status is " & oSkype.Convert.OnlineStatusToText(oUser.OnlineStatus)
 
'// Place a call:
Set oCall = oSkype.PlaceCall(oUser.Handle)
 
'// Wait until the call is in progress and return the relevant error if any other status occurs:
Do While oCall.Status <> cCallStatus_Inprogress
  If oCall.Status = cCallStatus_Failed Or _
    oCall.Status = cCallStatus_Refused Or _
    oCall.Status = cCallStatus_Cancelled Or _
    oCall.Status = cCallStatus_Finished Or _
    oCall.Status = cCallStatus_Busy Then
    Err.Raise vbObjectError + 1, "", "Call status: " & oSkype.Convert.CallStatusToText(oCall.Status)    
  End If    
  WScript.Sleep(500)
Loop
 
'// Check sending DTMF tones for use with interactive voice response (IVR) applications:
WScript.Sleep(10000)    
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "0" End If  
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "1" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "2" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "3" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "4" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "5" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "6" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "7" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "8" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "9" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "#" End If
WScript.Sleep(500)
If cCallStatus_InProgress = oCall.Status Then oCall.DTMF = "*" End If
WScript.Sleep(500)
 
'// Finish the call: 
If oCall.Status <> cCallStatus_Finished Then oCall.Finish() End If  
 
'// The AttachmentStatus event handler monitors attachment status and automatically attempts to reattach to the API following loss of connection:
Public Sub Skype_AttachmentStatus(ByVal aStatus)
  WScript.Echo  ">Attachment status " & oSkype.Convert.AttachmentStatusToText(aStatus)
  If aStatus = cAttachmentStatus_Available Then oSkype.Attach() End If
End Sub
 
'// If the call status is "failed", the CallStatus event handler returns the relevant failure reason as text:
Public Sub Skype_CallStatus(ByRef aCall, ByVal aStatus)
  WScript.Echo  ">Call " & aCall.Id & " status " & aStatus & " " & oSkype.Convert.CallStatusToText(aStatus)
  If cCallStatus_Failed = aStatus Then 
    WScript.Echo ">Failure reason:" & oSkype.Convert.CallFailureReasonToText(aCall.FailureReason)
  End If  
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
iaingibbonsAuthor Commented:
I am a novice really - I can create a table and design a form in access but thats about it - how would i integrate this into the database? Thank you so much!
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<I am a novice really - I can create a table and design a form in access but thats about it - how would i integrate this into the database? Thank you so much!>>
No coding experience then?   While not exactly simple, it's not all that difficult either, but there is nothing built-in to do what you want, so it means developing and coding a solution.
Time is a little short over here at the moment or I'd take some and code up a sample for this, which you could more or less drop in, but it still means you'd need to do some coding to get it to work.
 Let's wait just a bit and see if someone else jumps in.  Everyone on the assistance request list got pinged to look at this, so there will be quite a few eyes on this.
  Do you have a time frame on this or is it something that is going to be just a "nice to have" at some point?  I'm thinking if no one else responds in a couple of days, I might be able to free up some time to do the sample.  
JimD.
0
iaingibbonsAuthor Commented:
Hi, I am looking to kick off something next week. I have found a Skype toolbar which interacts with Excel 2007 and tags telephone numbers - this will provide me with a simple short term solution - though I hate using excel for data. I really appreciate all your effort on this - thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Chat / IM

From novice to tech pro — start learning today.