Call 3CX client from VBA application (access, excel ..)

Status
Not open for further replies.

alphachrome

Free User
Joined
Aug 29, 2007
Messages
7
Reaction score
0
Just for information ....

NB : Tools/References: TAPI3

Private Sub PhoneDialTapi(sNumber As String)
'Dim bFound As Boo :idea: :idea: lean
Dim indexAddr As Integer
Dim objCollAddresses As Object
Dim objCrtAddress As ITAddress
Dim objcollAddress As Object
Dim gobjTapi As TAPI
' Create the tapi object.
Set gobjTapi = New TAPI
' Call Initialize before calling any other TAPI function.
Call gobjTapi.Initialize
' pick up the collection of Address objects
Set objCollAddresses = gobjTapi.Addresses
' find address for 3CX VoIP Clien
'bFound = False
For indexAddr = 2 To objCollAddresses.Count
Set objCrtAddress = objCollAddresses.Item(indexAddr)
If objCrtAddress.AddressName = "3CX VoIP Client" Then
If objCrtAddress.QueryMediaType(TAPIMEDIATYPE_AUDIO) Then 'just for test !!
Set gobjAddress = objCollAddresses.Item(indexAddr)
Set gobjCall = gobjAddress.CreateCall(RTrim(sNumber), LINEADDRESSTYPE_PHONENUMBER, TAPIMEDIATYPE_AUDIO)
gobjCall.Connect (False)
'bFound = True
End If
End If
Next
End Sub
 
Wow! That's something very nice, I will most likely build an adress book using Access then since you provided this code. Is it fully working yet?

Like I said, I was planning to build an adress book, this code will help for sure, so that the users will be able to place the call directly from the adress book.

Thanks for your code.
 
Status
Not open for further replies.

Forum statistics

Threads
112,327
Messages
591,904
Members
165,483
Latest member
AshleyStokes