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

[µo°Ý] ¥ÎVBA°µOUTLOOK¯ó½Z(©Î±H«H)

[µo°Ý] ¥ÎVBA°µOUTLOOK¯ó½Z(©Î±H«H)

¦]¬°«Ü±`»Ý­n¤j¶q¥ý°µ¯ó½Z(©Î±H«H)
·Q¥ÎVBAªº¤è¦¡¨Ó³B²z
¦byoutube¤W¨Ì·Ópapaya¦Ñ®v©Mgoogle«÷´ê¥X·Q­n°õ¦æªº¤º®e
§Q¥ÎOUTLOOK½d¥»¤è¦¡, ¨Ï¥ÎVBA¥h¾Þ±±¥s¥X½d¥»¨Ó°µ­×§ï
¦ý¥d¦b°j°é¾É­PVBA¨S¿ìªk«ö·Ó§Ú¦Û¤vªº·Qªk¥h¶]
¥Ø«e¥d¦bªþÀÉ°ÝÃD, F2~K2¬O¥Î¨Ó©ñ¤WªþÀɸô®|
²Ä¤@«ÊÀH«H­n¥[¤W¨â­ÓªþÀÉ
²Ä¤G«Ê¤£¥ÎªþÀÉ
²Ä¤T«Ê¥u»Ý­n¤@­ÓªþÀÉ
¦ý¶]¥X¨Óªºµ²ªG·|¬O¤T«Ê³£§¨±a¨ì²Ä¤@¦Cªº¨â­ÓªþÀÉ
¦pªG§â°j°éWHILE©¹¤W¼g ¤]¤£¦¨¥\
·Q¨D±Ï¤@¤U¦U¦ì¤j¤j¸Ó«ç»ò­×§ï¤ñ¸û¦n
·PÁÂ


Sub ±H°e¶l¥ó()

    Dim ¤p«H®t As Outlook.Application
    Set ¤p«H®t = New Outlook.Application
   
    Dim ·s¶l¥ó As MailItem
    Dim ¦C¼Æ, Á`¦C¼Æ As Integer
   
    Á`¦C¼Æ = Cells(1000, 1).End(xlUp).Row
   
    For ¦C¼Æ = 2 To Á`¦C¼Æ
    Set ·s¶l¥ó = ¤p«H®t.CreateItemFromTemplate("C:\Users\XXXXXX\AppData\Roaming\Microsoft\Templates\XXXXX template\XXX¨ì³f.oft")
   
    With ·s¶l¥ó
        .To = Range("A" & ¦C¼Æ).Value
        .CC = Range("B" & ¦C¼Æ).Value
        .Subject = Range("C" & ¦C¼Æ).Value

        .HTMLBody = Replace(.HTMLBody, "µ|«h", Range("D" & ¦C¼Æ).Value)
        .HTMLBody = Replace(.HTMLBody, "FLIGHT", Range("E" & ¦C¼Æ).Value)
        
                i = 2
                j = 6
                While Sheets("¤u§@ªí1").Cells(i, j) <> ""
                sendFile = Sheets("¤u§@ªí1").Cells(i, j).Value
                ·s¶l¥ó.Attachments.Add sendFile
                j = j + 1

        .Close olSave
    End With
    Next ¦C¼Æ

End Sub

¦^´_ 1# a38480912

'i = 2 ³Q©T©w¬°²Ä2¦æ¤F
j = 6
While Sheets("¤u§@ªí1").Cells(¦C¼Æ, j) <> ""
      sendFile = Sheets("¤u§@ªí1").Cells(¦C¼Æ, j).Value
     ·s¶l¥ó.Attachments.Add sendFile
     j = j + 1
Wend

TOP

¦^´_ 2# ­ã´£³¡ªL


    ²z¸Ñ¤F,·PÁ¤j¤j:D

TOP

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