TAPI Call in lotus notes using lotus script

I want to enable TAPI call in lotus notes. I found one lotus script for Make Call, which invokes the phone dialer for making the TAPI call

The lotus script for TAPI make call is follows:

Declare Sub tapiRequestMakeCall Lib “TAPI32” (Byval lpszDestAddress$,Byval

lpszAppName$, Byval lpszCalledParty$, Byval lpszComment$)

Sub Initialize

Dim s As New NotesSession

Dim doc As NotesDocument

Dim strPhoneNumber As String

Dim strAppName As String

Dim strCallParty As String

Dim strComment As String

Dim docTmp As NotesDocument

Set doc=s.CurrentDatabase.UnprocessedDocuments.GetFirstdocument

If Not doc Is Nothing Then

strPhoneNumber=doc.OfficePhoneNumber(0)

If strPhoneNumber=“” Then strPhoneNumber=doc.PhoneNumber(0)

If strPhoneNumber=“” Then strPhoneNumber=doc.phone_number(0)

strAppName=“Notes Dialer”

strComment=“Automatic Dialing”

strCallParty=doc.FullName(0)

If strPhoneNumber=“” Then

Set docTmp= s.CurrentDatabase.CreateDocument

Dim ws As New NotesUIWorkspace

docTmp.CallParty=strCallParty

If ws.DialogBox ( “Notes Dialer”, True, True, False, False, False, False,

“Notes Dialer”,docTmp) Then

strPhoneNumber=docTmp.PhoneNumber(0)

strCallParty=docTmp.CallParty(0)

End If

End If

If Instr(strPhoneNumber," x") Then

strPhoneNumber=Left$(strPhoneNumber,Instr(strPhoneNumber, " x")-1)

If strCallParty=“” Then strCallParty=doc.orgName(0)

If Trim(strPhoneNumber) <>“” Then Call

tapiRequestMakeCall(strPhoneNumber,strAppName,strCallParty,strComment)

End If

End Sub

I want to add a menu item something like “Call” or “Make Call” or “Make TAPI Call” or “Place Call”, when I right click on a contact in Lotus Notes Contacts. And upon selecting the menu item it should call the lotus script shown above(which does the actual TAPI Call - invoking Phone Dialer).

How Can I do this? I have installed Lotus Domino Designer in my machine. Please Help…

Subject: Work from within the view

Create an action button.

In the action button properties you can select to have the action button appear in the right click mouse menu.

Then you incorporate the code into the action button - after adapting the variables coming from your form to match was it needed in the script.

That should do the trick.

cjost@trace.ch