By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,363 Members | 3,622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,363 IT Pros & Developers. It's quick & easy.

How do I send Instant Messages through VBA?

P: n/a
How do I send Instant Messages through VBA?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Here's some code that works for AOL-IM.
I hope it helps you.
lq

Function AOLAIM(myFrm As String)
On Error GoTo myErr
'attach this sode to a command button beside the screen name field

'ScreenName is the name of the field where the IM name is
Forms(myFrm).ScreenName.SetFocus

If Len(Forms(myFrm).ScreenName) > 0 Then

'make sure this is the correct path:
Dim myPath As String
myPath = "C:\Program Files\AIM\Aim.exe"
Shell myPath & " aim:goim?screenname=" &
Forms(myFrm).ScreenName, vbNormalFocus
End If

myExit:
Exit Function
myErr:
If Err.Number = 53 Then
'AOL .exe file not found so run some code to locate it:
Else
MsgBox Err.Number & " " & Err.Description
End If
Resume myExit
End Function

jd****@ironbridgellc.com (John Davis) wrote in message news:<1c**************************@posting.google. com>...
How do I send Instant Messages through VBA?

Nov 12 '05 #2

P: n/a
I implemented the code below and it only opens an IM message. How do I
get it to send it automatically

Thanks in advance for your help

John
Lauren Quantrell wrote:
Here's some code that works for AOL-IM.
I hope it helps you.
lq

Function AOLAIM(myFrm As String)
On Error GoTo myErr
'attach this sode to a command button beside the screen name field

'ScreenName is the name of the field where the IM name is
Forms(myFrm).ScreenName.SetFocus

If Len(Forms(myFrm).ScreenName) > 0 Then

'make sure this is the correct path:
Dim myPath As String
myPath = "C:\Program Files\AIM\Aim.exe"
Shell myPath & " aim:goim?screenname=" &
Forms(myFrm).ScreenName, vbNormalFocus
End If

myExit:
Exit Function
myErr:
If Err.Number = 53 Then
'AOL .exe file not found so run some code to locate it:
Else
MsgBox Err.Number & " " & Err.Description
End If
Resume myExit
End Function

jd****@ironbridgellc.com (John Davis) wrote in message

news:<1c**************************@posting.google. com>...
How do I send Instant Messages through VBA?


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.