Dial telephone numbers directly from the Calc cell

Discussions about using 3rd party extension with OpenOffice.org
Locked
tinchev
Posts: 3
Joined: Wed Jul 14, 2010 6:16 pm

Dial telephone numbers directly from the Calc cell

Post by tinchev »

Hello,

I tried to find an extension or macro that dials a telephone number directly from the cell in Calc, or may be anywhere in the package when I right click the number or press a shortcut, but I couldn't find one. Can you please help me to find such a solution which will save me (and may be a million other people around the world) time every day.

Thank you.

 Edit: Topic locked, since solutions from many years ago may no longer be relevant and people with current questions about this subject shoud open their own topic explaining in detail how they intend to "dial" from their computer and what versions of software they are using: Operating system, Office suite, Telephone dialing, etc. 
-- MrProgrammer, forum moderator, July 2022  
Last edited by MrProgrammer on Fri Jul 08, 2022 3:39 pm, edited 2 times in total.
Reason: Lock topic
OpenOffice 3.2 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the cell

Post by Zizi64 »

I created a cell function to make Skype calling.
I tried the cell function below with a Skype username: it works!

Code: Select all

Function My_Callto(TelNumber as string) as string

Dim oSvc as object

  oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
  oSvc.execute(ConvertToUrl("callto://"+ TelNumber), "", 0)

rem return value (because this is a FUNCTION):
My_Callto = "Done" 
End function
Of course, Skype is already running when I called the cell function.
You can create a SUB to make a Skype call with telephone number/username of the highlighted (selected) cell. The macro must be associate to a toolbar, or a button, or a new menu item.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
tinchev
Posts: 3
Joined: Wed Jul 14, 2010 6:16 pm

Re: Dial telephone numbers directly from the cell

Post by tinchev »

Thank you, Tibor. It works with Skype.
However, I need it to work with an office telephone using tone dialing. Any other idea?
OpenOffice 3.2 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

What hardware and software devices you have for making a "normal" telephone call?
Do you have: Analog modem?; SIP interface and/or client?; SIP account? ISDN line(s) with PC modem?; LAN?; Direct internet connection? ...And more questions...
I not know any solution based that devices, but I think, that needed to known for suggest a solution.
 Edit: (With Skype you can call "normal" telephone numbers, but it is not free of charge.) 
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

Examples of complete "CallTo" syntax:

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

I tried to make a call via a - SIP standard - Voip client (named: 3CXPhone). It is works:

Code: Select all

Function My_SIP_Call(TelNumber as string) as string

Dim oSvc as object

  oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
  oSvc.execute(ConvertToUrl("c:\Program Files\3CXPhone\3cxphone.exe" ), "dial:"+TelNumber, 0)

rem return value (just because this is a FUNCTION):
My_SIP_Call = "Done"
End function
Last edited by Zizi64 on Mon Nov 07, 2011 6:44 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
tinchev
Posts: 3
Joined: Wed Jul 14, 2010 6:16 pm

Re: Dial telephone numbers directly from the Calc cell

Post by tinchev »

I am sorry I didn't reply quicker, but I was very busy with other tasks. I will check and implement the macro and test it in the next 1-2 days, because I have some other importnat things to do.

I have an internal analog software modem on my laptop which I want to use for the purpose of calling.

In the meanwhile, if anyone else has other ideas, please share them. It will be very helpful.
OpenOffice 3.2 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

I have an internal analog software modem on my laptop which I want to use for the purpose of calling.
In this case you need a dialer software. That dialer (phone software) you need to control via Shell from OOCalc (and OOBasic)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

tinchev, it was a good idea!

It is works when the 3CXPhone Voip client (softphone) configured to direct Voip account, it works when the Voip client configured as extension of our Phone management system. (Our PC based phone sytem have a Voip account, an ISDN2 telephone line, a Voip/AnalogPhone gateway, some analog phones, and more softphones)

I created an extended macro with hungarian dialing rules (conditional adding country code, area code, prefix to voip system etc., because our old Calc (ex Excel5.0) file contains the numbers in various forms :( )
I associated the macro with a new menu item of Calc: just I highlight the number in cell, then one click on menu, and the Macro (via softphone) dials it!
:D
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
westburian
Posts: 2
Joined: Mon Jul 04, 2011 8:13 am

Re: Dial telephone numbers directly from the Calc cell

Post by westburian »

I'd like to pursue this and find a way to be able to dial a phone number from a cell in calc.

It has been done with M$ and Excel -- and a company has a product at exceldialer.com with a video. The user either clicks or highlights a cell with the phone number to be dialed, the number is dialed, and you hear the person answer (or not) in the speaker, and pick up your phone and have your conversation. I do fundraising for a charity at home, and this would greatly simplify my life over manually dialing every single number, as I have the addresses and phone numbers in .csv files which are no problem for calc to display and work with, I would like to use the arrow keys to move down the cells with the phone numbers, press a key, and have them dialed one by one.

I do not use M$ Windows any more, at all period. (that's another thread!) I use Slackware Linux and I have openoffice.org3. Version 3.0. Life is good.

Now, onto my hardware that would do the actual dialing over a POTS telephone line. I have an internal PCI modem, it is a true hardware modem, not a winmodem, with the lucent venus chipset. It uses a non standard base port and irq, and I have it set up so that it works fine with the minicom terminal, and I can also send text faxes with the efax program.

So that means I can start the minicom terminal, and enter hayes AT commands to dial phone numbers, get info on the modem, in fact it is constantly in use as a caller ID and it I have it log incoming calls to a text file. Here is a sample of initializing the modem and entering standard hayes AT commands. Here I get it to dial my own phone number (busy signal) and get it to display some info on the modem itself:

westburian@mattsw12:~$ minicom
Press CTRL-M Z for help on special keys
AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
OK
atz
OK
atdt7137283334
BUSY
OK
ati3
U.S. Robotics 56K FAX INT V5.20.4
OK

And here is a snip from the script I use to send a text file as a fax:

# setserial /dev/ttyS2 uart 16550A port 0x9400 irq 0 -v -G
efax -o 1 -d /dev/ttyS2 -t 7137843000 /home/westburian/efax/faxthis.txt

I think the setserial command I only issued once, nontheless we have the modem's information, and we know that it works.

What I need now is a way to use the arrow keys to navigate to a cell in an open calc spreadsheet, hit a predetermined key or key combo (Macro?), and have it dial that number. The modem has an adequately loud speaker, I will hear it dial, and connect, if a person answers, I will simply pick up the phone, hit a key to hang up the modem connection (ATH0) and have my phone conversation, or if no one answers, hit the hang up key and arrow key on down to the next phone number and repeat the process.

I'm thinking that the best way to do this would be to have minicom open and the modem initialized, and then have a macro in open office send the atdtxxxxxxx command to minicom to dial the number, that's all. Then another macro to send the ATH0 hang up command.

Or maybe all that's needed is to send the ATDTxxxxxxx and ATH0 commands directly to /dev/ttyS2 ????? I imagine that is what efax does, but I feel fairly certain that it is preceeded by a modem initialization string that we don't see.

Whatever method is used, there has to be a way.

Also, and what I might ultimately like to do, is that since I have a voip service already, is to set up a sip phone such as ekiga or zoiper or X-lite with my voip service, but I am not at that point yet, for one thing I use a preconfigured ATA box my voip provider sent me, and they do not directly support sip phones, so I would like to focus on simply having my modem dial the number and connect.

Any help MUCH appreciated!
Open Office v 3.0
westburian@mattsw12:~$ uname -a
Linux mattsw12 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

Hi,
What I need now is a way to use the arrow keys to navigate to a cell in an open calc spreadsheet, hit a predetermined key or key combo (Macro?), and have it dial that number. The modem has an adequately loud speaker, I will hear it dial, and connect, if a person answers, I will simply pick up the phone, hit a key to hang up the modem connection (ATH0) and have my phone conversation, or if no one answers, hit the hang up key and arrow key on down to the next phone number and repeat the process.
Sorry, I can not try that task without the hardware requirements...You can try to send the modem commands over serial port. For handling of serial port see:
http://user.services.openoffice.org/en/ ... 20&t=31686


...or use a SIP softphone wits my example code snippet (see above)
Last edited by Zizi64 on Mon Nov 07, 2011 6:45 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

I have got a message:
Hi,

Reffering this conversation http://user.services.openoffice.org/en/ ... 47&t=32417 - I've created function for cell as you suggested.
When I put phone number in cell and activate macro (from toolbar) my Skype wake up, show me phone dialing window but without phone number. Also it doesn't start dialing.

Is this function still works for you?

I have Skype 5.5.
Please, could you check is there solution for this problem?

Thank you for help and best regards,
Zvex
Well, as I wrote, I have tried to call Skype USERNAMEs only, but not tried to call real Telephone Numbers through Skype.
If you want to call real Telephone Numbers, then you need buy Skype phone credit, then you need make a try...


I suggest to use the SIP standard voip phones softwares, and SIP Voip providers for calling the real Telephone Numbers, because (in my opinion) they are cheaper than Skype. The protocol of Skype does not meet the SIP standard! (Session Initiation Protocol)

for example, you can use:
JustVoip, ActionVoip, Rynga... etc.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Zvex
Posts: 3
Joined: Mon Nov 07, 2011 2:28 pm

Re: Dial telephone numbers directly from the Calc cell

Post by Zvex »

Zizi64 wrote:
Well, as I wrote, I have tried with Skype USERNAMEs only, but not tryed with real Telephone Numbers.
If you want to call real Telephone Numbers, then you need buy Skype phone credit, then you need make a try...

I suggest to use the SIP standard voip phones softwares, and SIP Voip providers for calling the real Telephone Numbers, because (in my opinion) they are cheaper than Skype...

for example:
JustVoip, ActionVoip, Rynga... etc.
I have Skype phone credit. I've tried your function with phone numbers and also with Skype usernames - neither works.
When I call this function (=MY_CALLTO(Skype.username) or =MY_CALLTO(phone.number)) from cell Skype windows popup but nothing happens.

Maybe I'm doing something wrong?
OpenOffice 3.3.0 @ WinXP
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

Hi,

+1 :(
Do not work it for me with Skype version 5.3.0.111.
It worked with older Skype version(s)
Sorry, I use SIP phone usually, my example code was not checked with newer Skype versions...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

Hi,
Something changed in new Skype versions. I found a solution on a Hungarian web page. I modified the code based on example code of that site:

Code: Select all

Function My_Callto(TelNumber as string) as string

Dim oSvc as object

    oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
REM oSvc.execute(ConvertToUrl("callto://"+ TelNumber), "", 0) 'the old command
    oSvc.execute(ConvertToUrl("skype:"+ TelNumber+"?call"), "", 0) 'the new one

rem return value (because this is a FUNCTION):
My_Callto = "Done"
End function
This code works for me (with Skype names)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Zvex
Posts: 3
Joined: Mon Nov 07, 2011 2:28 pm

Re: Dial telephone numbers directly from the Calc cell

Post by Zvex »

Zizi64 wrote:Hi,
Something changed in new Skype versions. I found a solution on a Hungarian web page. I modified the code based on example code of that site:

Code: Select all

Function My_Callto(TelNumber as string) as string

Dim oSvc as object

    oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
REM oSvc.execute(ConvertToUrl("callto://"+ TelNumber), "", 0) 'the old command
    oSvc.execute(ConvertToUrl("skype:"+ TelNumber+"?call"), "", 0) 'the new one

rem return value (because this is a FUNCTION):
My_Callto = "Done"
End function
This code works for me (with Skype names)
Thanks.
I've changed the code but still with no luck. When I call this function from cell with =MY_CALLTO(skype.name) I've got '#NAME?' in cell.

You also mentioned in one previous post that this function can be called from Tolbar. How can I do that?
I've copied your code in 'My Macros & Dialogs.Standard. Is that correct?
OpenOffice 3.3.0 @ WinXP
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

I've copied your code in 'My Macros & Dialogs.Standard. Is that correct?
Yes, it is correct

When I call this function from cell with =MY_CALLTO(skype.name) I've got '#NAME?' in cell.
It means:
1.: the function named MY_CALLTO is not available
2.: The parameter is not a string. The skype.name is interpreted as a variable name, and the variable do not contain any name string... You need try it with quote marks: =MY_CALLTO("skype.name")

Here is a renamed [MY_SKYPECALL] macro in the Standard library of the attached file:
SkypeCall.ods
(9.39 KiB) Downloaded 505 times
Last edited by Zizi64 on Tue Nov 08, 2011 6:17 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Zvex
Posts: 3
Joined: Mon Nov 07, 2011 2:28 pm

Re: Dial telephone numbers directly from the Calc cell

Post by Zvex »

Zizi64 wrote:
I've copied your code in 'My Macros & Dialogs.Standard. Is that correct?
Yes, it is correct
When I call this function from cell with =MY_CALLTO(skype.name) I've got '#NAME?' in cell.
It means:
1.: the function named MY_CALLTO is not available
2.: The parameter is not a string. The skype.name is interpreted as a variable name, and the variable do nor contain any name... You need try it with quote marks: =MY_CALLTO("skype.name")

Here is a renamed [MY_SKYPECALL] macro in the Standard library of the attached file:
SkypeCall.ods
Great! Now it is working with skype names and also with numbers. Thank you very much.

Now, is it possible to put that function/macro in toolbar?
I've tried to do that with Edit->Toolbars->Customize...->Tab Toolbars->Add->Then select it from OpenOffice.org Macros-Skype.Calls.ods-Standard-Module1-My_SkypeCall but without luck.
How the cell is have to be formated? "echo123"?
OpenOffice 3.3.0 @ WinXP
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

You must modify the code:
A function can to get a paramater from a given referenced cell, but you need now the next procedure: My example subroutine will get the parameter from a selected cell.
CallSkype_fromToolbar.ods
(11.46 KiB) Downloaded 592 times
It is a very simple example code without any advanced features...

If you you must to do another things (for example: edit the string or purge some characters from the text of the selected cell), then you need learn about the Basic language, and OOo API. (Then you can handle the multiple cell selection, etc...)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
viktorz
Posts: 2
Joined: Thu Mar 15, 2012 11:33 am

Re: Dial telephone numbers directly from the Calc cell

Post by viktorz »

Simple code for them who have knowledge ))
i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40i40инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
Last edited by viktorz on Fri Sep 21, 2018 1:31 pm, edited 3 times in total.
OpenOffice 3.1 on Windows7
ottokrog
Posts: 2
Joined: Mon Apr 08, 2013 11:57 am

Re: Dial telephone numbers directly from the Calc cell

Post by ottokrog »

Could anybody give a simple way to do this. I have tried to understand, but need a tutorial for dummies. Thanks a lot. Just a simple a to b to c tutorial. Please.
openoffice 3.3.0 on windows vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dial telephone numbers directly from the Calc cell

Post by Villeroy »

ottokrog wrote:Could anybody give a simple way to do this. I have tried to understand, but need a tutorial for dummies. Thanks a lot. Just a simple a to b to c tutorial. Please.
This is not for dummies. So dummies can not do this.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
ottokrog
Posts: 2
Joined: Mon Apr 08, 2013 11:57 am

Re: Dial telephone numbers directly from the Calc cell

Post by ottokrog »

I am not that dum. Give it a try, please.
openoffice 3.3.0 on windows vista
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

Could anybody give a simple way to do this. I have tried to understand, but need a tutorial for dummies. Thanks a lot. Just a simple a to b to c tutorial. Please.
What documentation do you need?

1.: about AOO/LO Basic (or other built in) programming language of the Office suite?
See the Basic Help,
http://en.wikipedia.org/wiki/OpenOffice_Basic
http://www.google.hu/url?sa=t&rct=j&q=& ... 5338,d.d2k

2.: about AOO/LO Basic IDE? (Integrated Development Environment)
https://help.libreoffice.org/Basic/Inte ... onment_IDE
https://help.libreoffice.org/3.3/Basic/Basic_IDE
http://wiki.openoffice.org/wiki/Documen ... IDE_Window
http://wiki.openoffice.org/wiki/Documen ... _Basic_IDE

3.: about AOO/LO API? (Application Programming Interface)
http://api.libreoffice.org/
http://api.libreoffice.org/examples/examples.html
http://www.openoffice.org/api/


4.: ...and must read Andrew Pitonyak's book(s)
http://www.pitonyak.org/oo.php
http://www.google.hu/url?sa=t&rct=j&q=& ... 5338,d.d2k
http://www.pitonyak.org/book/

5.: ...and see the topics of this Forum:
http://forum.openoffice.org/en/forum/viewforum.php?f=20
http://forum.openoffice.org/en/forum/viewforum.php?f=21
and more...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
qu4rk
Posts: 27
Joined: Mon Mar 17, 2014 7:43 pm

Re: Dial telephone numbers directly from the Calc cell

Post by qu4rk »

Zizi64 wrote:Hi,
Something changed in new Skype versions. I found a solution on a Hungarian web page. I modified the code based on example code of that site:

Code: Select all

Function My_Callto(TelNumber as string) as string

Dim oSvc as object

    oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
REM oSvc.execute(ConvertToUrl("callto://"+ TelNumber), "", 0) 'the old command
    oSvc.execute(ConvertToUrl("skype:"+ TelNumber+"?call"), "", 0) 'the new one

rem return value (because this is a FUNCTION):
My_Callto = "Done"
End function
This code works for me (with Skype names)
Hi, I tried to use your macro. I'm using Ubuntu 14.04 & Skype 4.3.0.37 is running.

I ran the function with a phone number from the cell beside of it. The cell says Done. Is it supposed to be clickable or is it supposed to dial or something else?

Thanks!
OpenOffice 4.0.2.2 on Linux
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

It works for me on WinXPprofSP3, with LibreOffice 4.2.7.2 and Skype 6.14.0.104

Works the SUB (see the my .ods attachement above), and the FUNCTION too.
The function will dial the identifier again, when the content of the passed cell is changed.

I never tested these program codes with Skype AND phone numbers, because for calling a NUMBER it necessary some money charge to the Skype account. But it works with Skype identifiers.
I am using SIP providers (ActionVoip, SipDiscount, Rynga, etc...) and accounts for calling landline phones, and mobiles. There are many providers which allow free landline calls for 120 days after charge 10 Euro, and the calling mobiles is very cheap (I am living in Hungary). See the prices:
https://www.voipkredi.com/page.php?page=rates
You can integrate these SIP callings into the Calc document, too.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Artyparis
Posts: 1
Joined: Fri Jan 23, 2015 1:29 pm

Re: Dial telephone numbers directly from the Calc cell

Post by Artyparis »

Hello,

I would like to put a Skype button in a Writer doc (exported in Word 2000).
You open the doc, you click on Skype button, and you chat/call me.
How can I do that ?


Sorry, I'm a noob and don't know that much^^

Thank you for your help.
OpenOffice 4.1.1
Windows 8.1
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Dial telephone numbers directly from the Calc cell

Post by Zizi64 »

(exported in Word 2000)
Always use the native standardized ODF file formats.

If you use some StarBasic (or other prog. lang.) macros with AOO/LO API function calling, maybe you can not convert to MS VBA for the MS .doc or .docx document format.

Otherwise this task seems simple:

From Menu: Insert - Hyperlink - Path:

Code: Select all

skype:echo123?call
- Text:

Code: Select all

Call the Skype echo
- OK

where "echo123" is the 'phone number' or 'user name' what must call by Click (or Ctrl-Click) on Hyperlink.


The Skype Client must be installed on the Recipient's PC
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Locked