- ©«¤l
- 22
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 58
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-5-18
|
[µo°Ý] ¥ÎVBA°µOUTLOOK¯ó½Z(©Î±H«H)
¦]¬°«Ü±`»Ýn¤j¶q¥ý°µ¯ó½Z(©Î±H«H)
·Q¥ÎVBAªº¤è¦¡¨Ó³B²z
¦byoutube¤W¨Ì·Ópapaya¦Ñ®v©Mgoogle«÷´ê¥X·Qn°õ¦æªº¤º®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«Hn¥[¤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
|
|