Link to home
Start Free TrialLog in
Avatar of KKress
KKressFlag for Germany

asked on

Outlook 2013, VBA: initiating a skype call

Is there a way to initiate a Skype call via vba code from Outlook? The idea is to pass a phonenumber from an Outlook contact item to Skype phone.
Avatar of Michael Fowler
Michael Fowler
Flag of Australia image

Have a look at this previous answer

https://www.experts-exchange.com/questions/27414783/Skype-calling-from-Access-2010-Database-VBA-using-Skype4Com.html

Dim skpSkype As SKYPE4COMLib.Skype
Dim calCall As SKYPE4COMLib.Call

Set skpSkype = New SKYPE4COMLib.Skype
Set calCall = skpSkype.PlaceCall(Phone_Number.Text)

Open in new window

Avatar of KKress

ASKER

Michael74, what do I Need to do to make this code work? I set a reference to Skype4COM 1.0 Type Library, but that didn't do the Job. What am I missing? Or do I require different code for Outlook? I have the understanding that Outlook VBA and ACCESS VBA are quite different?
Avatar of David Lee
Hi, KKress.

If you're using the code exactly as @Michael74 posted it, then "no" it won't work in Outlook.  How do you want this to work?  Do you want to select a contact and initiate a call to one of the numbers in that contact or do you want to enter a number to call?  If it's the former, then which number do you want to call or do you want to be prompted to select the number to call?
Avatar of KKress

ASKER

Hi BlueDevilFan,

actually it should work just like the call Feature of exchange. With Exchange one can select a contact, right click and and select a number to be called. Unfortunatelly this Feature requires a rather expensive Exchange plan 4. So the idea is to offer the exact same sort of functionality but not initiate a lync call, but pass the selected Telefone number to Skype. Essentially I'm using the commandline call to Skype as a Workaround. But I thought there might be a direct way to call Skype.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KKress

ASKER

@BlueDevilFan: Looks all pretty straightforward. Nevertheless, I can't get it to work, and I have no clue, what I'm doing wrong. So using your code I receive an runtime error 429 (ActiveX componentcan't create object) at Statement "Set skpSkype = New SKYPE4COMLib.Skype". I have referenced skype4comlib, it is available in the vba Editor and Shows all available properties and methods, but it doesn't want to create this object. Any ideas?
KKress,

I'm not in a position to test the Skype specific portion of the code.  In the VB editor, if you type out

Set skpSkype = New SKYPE4COMLib.

Open in new window


what appears in the list of items that pops up as soon as you hit the period?
Avatar of KKress

ASKER

@BlueDevilFan: The error message is: Run-Time-Error 429: ActiveX component can't create object
Avatar of KKress

ASKER

@BlueDevilFan: I just reviewed this Topic to see whether I have to Close it. I realized that I obviously have given you an answer to your last question which was inappropriate. So let me give it another try. So here is the Pop-Up list when I type the satement set skpSkype = New SKAPE4COMlib.
(see attachment).
skype4comlib-screenshot.pptx
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
Avatar of KKress

ASKER

I'm pretty sure that I have a different additional issue, that has nothing to do with the original question. So I have to assume that the question is answered ans I'll post the additional issue as a seperate question.