* ada penjelasan

 
 
 
 
  
  
  
  
 
 
  
  Name
  Address
  Yes/No
 
 
  
  aku
  [email protected]

  yes
 
 
  
  anda
  [email protected]
  no
 
 
  
  kita
  [email protected]
  yes
 

 
 
 
Sub TestFile()
' Working in Office 2000-2010
    Dim OutApp As Object
    Dim OutMail As Object
    Dim cell As Range
    Application.ScreenUpdating = False
    Set OutApp = CreateObject("Outlook.Application")
    On Error GoTo cleanup' kolom B berisi karakter 
    For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)'      
harus berisi satu karakter ( ? ) atau tambahan 0 atau lebih karakter (*) dan 
ada tanda '@' dan '.''      pada kolom C berisi 'yes'
        If cell.Value Like "?*@?*.?*" And _
           LCase(Cells(cell.Row, "C").Value) = "yes" Then            Set 
OutMail = OutApp.CreateItem(0)
            On Error Resume Next
            With OutMail
                .To = cell.Value
                .Subject = "Reminder"
                .Body = "Dear " & Cells(cell.Row, "A").Value _
                      & vbNewLine & vbNewLine & _
                        "Please contact us to discuss bringing " & _
                        "your account up to date"
                'tambahkan file attachment
                '.Attachments.Add ("C:\test.txt")
                .Display  'Or use Send
            End With
            On Error GoTo 0
            Set OutMail = Nothing
        End If
    Next cell
cleanup:
    Set OutApp = Nothing
    Application.ScreenUpdating = True
End Sub

catatan : 
     anda harus menginstall outlook 2003/2007/2010

Silakan berkreasi 
To: [email protected]
From: [email protected]
Date: Fri, 28 Oct 2011 03:34:48 +0000
Subject: [belajar-excel] Mengirim Email Melalui Userform


















 



  


    
      
      
      Selamat pagi,





Dear rekan2 milis, saya membuat form, kalau di blog namanya email me, seperti 
terlampir, bisa kah, ketika button kirim di klik itu mengirim ke alamat email 
saya? Dengan textbox1 sebagai subject, dan textbox2 sebagai isi email,


Terimakasih.





Asror,





Semangat,











Safety is my responsibility


Sent from Super Asror's  BlackBerry® smartphone from Sinyal Bagus XL, Nyambung 
Teruuusss...!


    
     

    
    






                                          


    
     

    
    






                                          

Kirim email ke