Home > Software design >  Click to dial a phone number from MS access to MS teams
Click to dial a phone number from MS access to MS teams

Time:10-21

I'm new to MS access but have a lot of experience with excel. I'm wanting to create a database for a team of outbound callers. what I'd like is to be able to have a client list with a phone number that is "click to dial". We use MS teams for outbound calls so all I want is to click on the phone number in Access and have it populate in the dial pad on Teams. I've done this in excel but I'm struggling to find info on how to achieve the same thing in access.

In excel I used =HYPERLINK(CONCATENATE("TEL:",A1)) to turn a number into a hyperlink. the first time it is clicked on a helpful box appears asking what program I would like to use, I click teams and then subsequent clicks automatically populate the "A1" number into teams.

I've attempted to use the "phone" button in access, but this seems to want to use a "modem". I've also tried to use the hyperlink data type to turn the number into a hyperlink. but when I click the hyperlink it tries to treat the number as a web address and does not give me the option of how what program to use like the excel formula above.

I hope that makes sense and thank you in advance.

CodePudding user response:

I'd say you simply need to ask Windows to run the tel: protocol with a number you provide. In the most simple version, something like this:

Sub DialNumber(sNumber As String)
    CreateObject("Shell.Application").Open "tel:" & sNumber
End Sub

This is like pasting "tel:12345678" into Start -> Run.

If you are not sure if the tel: URL protocol is registered, you can check the registry key HKEY_CLASSES_ROOT\tel\URL Protocol.

CodePudding user response:

You can get the same functionality by using `Application.FollowHyperlink':

Private Sub Text0_DblClick(Cancel As Integer)
    Application.FollowHyperlink "TEL:" & Me!PhoneNumber
End Sub

Regards

  • Related