Outlook , yahoo si adrese de email

Vroiam sa trimit email de felicitari de Paste. Doar ca imi era greu sa iau din yahoo toate adresele de email … si m-am gindit sa le pun in Outlook. Am 3 vesti – doua poaste si una buna.

Veste proasta 1  : pop3 pe yahoo e pe bani

Veste proasta 2: ypops nu functioneaza

Veste buna 1 : pop3 pe yahoo e gratuit – pentru yahoo ASIA! http://www.khimhoe.net/2009/06/20/how-to-enable-pop3-in-yahoo-mail/

Asa ca am emailurile in yahoo – si un script VBA care preia toate adresele de email(unice…) si le arunca intr-un fisier:

  Dim c As MailItem
    Set c = Application.CreateItem(olMailItem)
    Dim d As Dictionary
    Set d = New Dictionary
    Dim l
    Dim strAdress As String
    For Each l In Application.ActiveExplorer.CurrentFolder.Items
        If Not (TypeName(l) = TypeName(c)) Then
            GoTo nextitem
        End If
        Set c = l
        strAdress = LCase(c.SenderEmailAddress)
        If (Not d.Exists(strAdress)) Then
            d.Add strAdress, c.SenderName
        End If
        If c.Recipients.Count > 1 Then
            Dim r As Recipient
            For Each r In c.Recipients
                strAdress = LCase(r.Address)
                If Not d.Exists(strAdress) Then d.Add strAdress, r.Name
            Next r
        End If
nextitem:
    Next l
    Dim text As String
    For Each u In d.Keys
        text = text & u & "," & Replace(d.Item(u), ",", " ") & vbCrLf
    Next u
    Dim f As FileSystemObject
    Set f = New FileSystemObject
    Dim ts As TextStream
    Set ts = f.OpenTextFile("cale catre csv…", ForWriting, True, TristateTrue)
    ts.WriteLine (text)
    ts.Close
    Shell "notepad " + "cale catre csv…", vbMaximizedFocus

Posted in VB

Leave a Reply

Your email address will not be published. Required fields are marked *