Por favor que alguien me ayude.
Alguien tiene un source de extraer la lista de contactos en el msn, 2009, 2010 y 2011?
He encontrado este código pero no funciona en MSN actualizado.
Option Explicit
'---------------------------------------------------------------------------------------
' Module : mMSNContacts
' DateTime : 29/09/2009 13:32
' Author : Skyweb07
' Mail : skyweb09@hotmail.es
' Purpose : Retrieve MSN Contact list
' Usage : At your own risk
' Requirements: Messenger API Type Library
'---------------------------------------------------------------------------------------
Dim hAPI As MessengerAPI.Messenger
Public Function Get_MSN_Contact_List(hReturn() As String, Save_List As Boolean, Optional hPath As String) As Long
On Error GoTo Error:
Dim hContacts As IMessengerContact
Dim hCount As Long
Dim hList As String
Set hAPI = New MessengerAPI.Messenger
For Each hContacts In hAPI.MyContacts
ReDim Preserve hReturn(0 To hCount)
hReturn(hCount) = hContacts.SigninName
hCount = hCount + 1: Get_MSN_Contact_List = hCount
hList = hList & vbNewLine & hContacts.SigninName
Next
If Save_List = True Then
If hPath <> vbNullString Then
Open hPath For Binary As #1
Put #1, , hList
Close #1
End If
End If
Exit Function:
Error: Debug.Print "MSN Messenger isn't installed or session is not started."
End Function
Well guys here how a simple example will get msn contacts with api. The only requirement is that you have installed the msn (obviously) and have the session started on the local computer. When the MSN is not installed error does not function simply returns 0. Here is an example of how to use it.
Dim hContacts() As String
Dim i As Long
If Get_MSN_Contact_List(hContacts, False, vbNullString) Then ' This is for Get the Contact list in a Array
For i = 0 To UBound(hContacts)
Debug.Print hContacts(i)
Next i
End If
'-------------------------------------------------------------------------------------------------------------
Call Get_MSN_Contact_List(hContacts, True, App.Path & "Contacts.txt") ' And this is for save contacts list in a file
Saludos a todos, un foro muy bueno Leandro.
[]'s