Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Macro to dial phone (Excel 2002 (Office XP))

    I need a macro or add-in module that will enable Excel to dial the phone for me.

    I spend a lot of time working with Excel tables; these are prospect lists with contact information. I would like to be able to use the Data Form and have Excel recognize the phone number and dial the phone.

    Ideas anyone?

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Excel Macro to dial phone (Excel 2002 (Office XP))

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> budman

    Well my question for you is where is the bottom of what MS-Excel is asked to do? My My its a spreadsheet and people use it for reports and graphs and recipe holders, calculators, and now phone dialers?! What next a microwave controller so that you don't have to walk to it and press 3 buttons. I think you are asking too much of MS-Excel...

    Oh wait a second check this website , but this website might prove that the bottom is yet to be reached... Unfortunately the URL is broken, so if you find anything useful, let us know.

    Good luck

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Excel Macro to dial phone (Excel 2002 (Office XP))

    Hi,
    If you've got the Windows Phone Dialer application, you can use a combination of Shell("Dialer.exe",1) and SendKeys to achieve this. I don't normally like SendKeys but can't think of another way of doing it off the top of my head.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    New Lounger
    Join Date
    Nov 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macro to dial phone (Excel 2002 (Office XP))

    Did you also want to tell me how to cook my pasta?

    Bill was the one who created this monster by adding VBA, not me. What I'm asking for isn't heavy lifting; I was just hoping to save some time.

    FWIW, your Google search didn't turn up anything worth while.

    If I get around to writing the script myself, I'll send it to you.

  5. #5
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Excel Macro to dial phone (Excel 2002 (Office XP))

    Add a button to the spreadsheet that contains the phone numbers.
    The phone numbers should be listed in a column.
    Attach the following code to the button:
    -----------------------------------------------------------------------------------------
    Sub CellToDialer() 'by John Walkenbach
    ' Transfers active cell contents to Dialer
    ' And then dials the phone
    ' Modified by Jim Cone on Jan 18, 2002

    Dim CellContents As String
    Dim AppName As String
    Dim AppFile As String
    Dim TaskID As Variant

    ' Get the phone number
    CellContents = ActiveCell.Value
    If Len(CellContents) < 7 Then
    MsgBox "Select a cell that contains a phone number.", _
    vbInformation
    Exit Sub
    End If
    ' Activate (or start) Dialer
    AppName = "Dialer"
    ' USE THE FULL FILE PATH APPROPRIATE FOR YOUR OPERATING SYSTEM
    AppFile = "C:Program FilesWindows NTdialer.exe"
    On Error Resume Next
    ' This activates the dialer if it showing on the desktop
    AppActivate (AppName)
    If Err.Number <> 0 Then
    Err = 0
    ' This activates the dialer by opening(running) the file
    TaskID = Shell(AppFile, vbNormalFocus)
    If Err <> 0 Then
    MsgBox "Can't start " & AppFile, vbExclamation
    Exit Sub
    End If
    End If

    ' Transfer cell contents to Dialer
    Application.SendKeys "%n" & CellContents, True

    ' Click Dial button
    Application.SendKeys "%d"
    ' Application.SendKeys "{TAB}~", True

    ' Selects the next telephone number in the column.
    ActiveCell(2, 1).Select
    ' The macro button must now be clicked twice to dial the next
    ' number in the column.
    End Sub
    ------------------------------------------------------------------------------------------

    Regards,

    Jim Cone

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •