- ©«¤l
- 1
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 2
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- 11
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2015-10-12
- ³Ì«áµn¿ý
- 2015-10-12
|
[µo°Ý] «ç¼Ë¥ÎVBA±NExcelªº¦W¦r³s®æ¦¡±a¶iOutlook?
¤j®a¦n,§Ú·Q§Q¥ÎExcelª½±µ¥´¶}Outlook,¦ý¤£ª¾¹D«ç»ò¼gVBA,¤§«e¦bºô¤W¬Ý¨ì¦³¤H³o»ò¼g:
Sub ex()
Set xlOut = CreateObject("Outlook.Application")
'±N±H¥X½d³ò©R¦W¬°Rng¡A¨ú±oRng©Ò¦³¤å¦r
For i = 1 To [Rng].Rows.Count
For j = 1 To [Rng].Columns.Count
s = IIf(s = "", [Rng].Cells(i, j), s & Chr(9) & [Rng].Cells(i, j))
Next
mystr = IIf(mystr = "", s, mystr & Chr(10) & s)
s = ""
Next
With xlOut
Set Mymail = .CreateItem(olMailItem)
With Mymail
.Subject = "Mail send test" '«H¥ó¥D¦®
.Recipients.Add "¦¬¥óªÌ@hotmail.com" '¦¬¥óªÌmailaddress
.Body = mystr '¥HRng¤º®e¬°¤º¤å
.Send '±H¥X«H¥ó
End With
End With
End Sub
ªº½T¬O¥i¥H§âExcelªº«ü©w½d³ò±a¶iOutlook,¦ý®æ¦¡¥þ³¡¨S¦³¤F,
À³¸Ó«ç»ò§ï¤~¥i¥H§â¦r«¬¤j¤pÃC¦âµ¥«O¦s©O?
¥t¥~,«ç»ò³]©wµo¥ó¤H?¦]¬°§Ú¦³¨âÓ±b¸¹,§Ú·Q¨Ï¥Î¥t¤@Ó±b¸¹µo¥ó,
½Ð±Ð¤j®aÀ°¦£,«ô°U¦U¦ì¤F,ÁÂÁÂ! |
|