Pakar Excel,
Saya membuat vba code untuk mengirimkan tiap sheet di workbook yang aktif ke alamat email yang berbeda beda,
Sub KirimEmail()
Dim sht As Worksheet, shtEmail As Worksheet, rgEmail As Range
Dim strEmail As String, strName As String, wbTmp As Workbook
Set shtEmail = ActiveWorkbook.
Set rgEmail = shtEmail.[N1]
For Each sht In ActiveWorkbook.
If sht.Name <> "0" Then
strName = sht.[D5] 'nama recepient
On Error Resume Next
'mengambil alamat email sesuai dengan namanya
strEmail = Application.
If Err.Number = 0 Then
Err.Clear
sht.Copy
Set wbTmp = ActiveWorkbook
wbTmp.SendMail strEmail, "LeaveRecord" & strName, True
wbTmp.Close SaveChanges:
End If
End If
Next
End Sub
Program berjalan sesuai harapan.
Cuma pada saat proses sending email tiap sheet, ada verification dari MS Outlook yang harus direspon (as attached). Kalo sheetnya banyakkan report….
Mohon bantuan rekan2 untuk memodifikasi code di atas agar saya tidak harus menge-click terus.
Terimakasih
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4524 (20091019) __________
The message was checked by ESET NOD32 Antivirus.
| Moderasi akan lambat minggu ini, momods pergi ke tempat jauh |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message, melecehkan, tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan winzip jika perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/ |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau... |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html |
+-------------------------------------------------------------------+
| Message lama ada di : |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id] |
| http://www.mail-archive.com/xl-mania@yahoogroups.com |
+-------------------------------------------------------------------+
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Nenhum comentário:
Postar um comentário