ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¥ÎExcel¾ã§å±H¹q¤l¶l¥ó(Email)

¥ÎExcel¾ã§å±H¹q¤l¶l¥ó(Email)

Private Sub cmdSendMail_Click()
    Dim objCdo As Object
   
    'Dim objCdo As CDO.Message
        
    strCfg = "http://schemas.microsoft.com/cdo/configuration/"

    'Set objCdo = New CDO.Message
    Set objCdo = CreateObject("CDO.Message")
   
    i = 2
   
    With objCdo
    .From = Sheet1.Range("from")
    .Fields("urn:schemas:mailheader:X-Priority") = 1 ' Priority = PriorityUrgent °ªÀu¥ý¶¶§Ç
    .Configuration(strCfg & "sendusing") = 2 ' Sendusing = SendUsingPort
    .Configuration(strCfg & "smtpserver") = Sheet1.Range("smtp") ' SMTP Server
    .BodyPart.Charset = "utf-8"   '¨Ï¥Î½s½X¤è¦¡

    End With
   
    If Sheet1.Range("username") <> "" Then
     ' SMTP Server ¦p»Ýµn¿ý , «h»Ý³]©w UserName / Password
       objCdo.Configuration(strCfg & "sendusername") = Sheet1.Range("username")
       objCdo.Configuration(strCfg & "sendpassword") = Sheet1.Range("password")
    End If
   
    objCdo.Configuration.Fields.Update ' §ó·s (Äæ¦ì) ²ÕºA
   
    While Sheet2.Range("A" & i) <> ""
        
        objCdo.To = Sheet2.Range("A" & i)
        
        objCdo.CC = Sheet2.Range("B" & i)
   
        objCdo.BCC = Sheet2.Range("c" & i)
        
        objCdo.Subject = Sheet2.Range("d" & i)
        
        If Sheet2.Range("A" & i) = "([email protected])" Then
           MsgBox
           Exit Sub
        End If

¦^´_ 1# 198188

«e½ú¥­¦w
«Ü¦³½ìªº§Þ¥©
³o­Ó§Þ¥©¦p¦ó¨Ï¥Î ?
µL¤îºÉªº§V¤O¤W¶i

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD