Solved

yhoo chat via excel spread sheet

Posted on 2014-02-03
26
636 Views
Last Modified: 2014-02-09
Hi Experts,

Is there any way to yahoo chat via excel spread sheet?

Thanks
0
Comment
Question by:Naresh Patel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 16
  • 10
26 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39831136
Here's a snippet using Office Communicator:

1) Install Office Communicator[
2) Alt-F11 (to open the VBE)
3) Tools > References
4 Check box of anything beginning with Microsoft Offcie Communicator
5) Save, Close Excel, Reopen, try again

Sub SendIM()

    Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced
    Dim ToUser As String
    Dim message As String

    Application.ScreenUpdating = False

    ToUser = "someone@somewhere.com”"
    message = "test vba communicator”"

    On Error Resume Next
    Set msgr = Messenger.InstantMessage(ToUser)
    '
    'Send message to window
    '
    msgr.SendText (message)
    msgr.Close

    Application.ScreenUpdating = True

End Sub

Open in new window


from: http://vbaninja.wordpress.com/excel/how-to-send-an-instant-message-from-excel-using-communicator/
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39831195
Mr.MacroShadow,

will you provide me exact link for download office communicator, I had visited your link but I cant find any  option for to download.

thanks
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39831212
I found this as per sound step VBA reff


Thanks
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:Naresh Patel
ID: 39831221
or is there any way to click on excel sheet button & some range data copy & past to yahoo messenger window which is on desktop & sent?


Thanks
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39831225
apology as I am now off the desk for 9 hours.


thanks
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832063
I am back online Sir
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39832200
1. Microsoft Office Communicator 2007 R2 Trial is available to download from http://www.microsoft.com/en-us/download/details.aspx?id=8468

2. You can probably use the Yahoo! Messenger library, hit F2 in the VBE to see what functions and methods it made available to developers.

3. You can use Microsoft Spy++ to find the hwnd of yahoo chat application and its text box.

Then you can use the following APIs findwindow, findwindowx and sendmessage to send text to that text box.
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832258
ok got it let me check what can do as you suggested.

but still this is possible
or is there any way to click on excel sheet button & some range data copy & past to yahoo messenger window which is on desktop & sent?



Thanks
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39832277
That was point #3.
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832283
See Sir I am not IT guy or Programmer so it is beyond my understanding. I had installed
1. Microsoft Office Communicator 2007 R2 Trial is available to download from

now what you suggest?

Thanks
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39832296
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832473
1) Install Office Communicator[
2) Alt-F11 (to open the VBE)
3) Tools > References
4 Check box of anything beginning with Microsoft Offcie Communicator
5) Save, Close Excel, Reopen, try again

Too many options what to select all 3 or any one?
Thanks
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39832548
"anything".
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832649
ok done
Sub SendIM()

    Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced
    Dim ToUser As String
    Dim message As String

    Application.ScreenUpdating = False

    ToUser = "someone@somewhere.com”"
    message = "test vba communicator”"

    On Error Resume Next
    Set msgr = Messenger.InstantMessage(ToUser)
    '
    'Send message to window
    '
    msgr.SendText (message)
    msgr.Close

    Application.ScreenUpdating = True

End Sub

Open in new window



Do u want me to add this code as module?

Thanks
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39832691
Yes.

Change line 10 to the cell that holds the message to send. i.e. message = Range("A1")
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39832993
Error Message
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39833006
Exactly this one
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39833036
Did you follow steps 1-5?
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39833081
yes
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39833123
What happens if you delete the following:
As CommunicatorAPI.IMessengerConversationWndAdvanced

Open in new window

so you're left with:
Dim msgr

Open in new window

0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39833145
nothing is happening. i had crated macro button & assigen this Code. but while clicking previously getting error message & after
Dim msgr

Open in new window

.

Nothing happen..
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39833625
?
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39841180
How about this:
Dim msgr As Object
Set msgr = CreateObject("CommunicatorAPI.IMessengerConversationWndAdvanced")

Open in new window


Instead of this:
Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced

Open in new window

0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 39843284
Error MessageDebugThanks & Sorry For Delay In Reply.
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39844360
Just a silly question, is Microsoft Office Communicator running when you run your code? If not it will certainly explain your error.

Try this (first run the first sub then the second):
Sub LaunchCommunicator()
    Dim oCom As Object
    Set oCom = CreateObject("Communicator.UIAutomation")
    oCom.AutoSignin
End Sub

Sub SendIM()

    Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced
    Dim ToUser As String
    Dim message As String

    Application.ScreenUpdating = False

    ToUser = "someone@somewhere.com”"
    message = "test vba communicator”"

    On Error Resume Next
    Set msgr = Messenger.InstantMessage(ToUser)
    '
    'Send message to window
    '
    msgr.SendText (message)
    msgr.Close

    Application.ScreenUpdating = True

End Sub

Open in new window

0
 
LVL 8

Author Closing Comment

by:Naresh Patel
ID: 39846587
Excellent
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question