sekedar sharing saja,
setelah tanya mas google, saya ketemu code yang sesuai dari http://www.rondebru
"problem solved"
berikut copy coding CDO yang sudah saya modif:
Private Sub CDOEngine(aWb As Workbook, strSmtp As String, strTo As String, _
strSender As String, strSubj As String, strFile As String)
'dimodifikasi dari: http://www.rondebru
Dim iMsg As Object
Dim iConf As Object
Dim Flds As Variant, DefPath As String, Fname As String
Set iConf = CreateObject(
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.
.Item("http://schemas.
.Item("http://schemas.
.Update
End With
DefPath = Application.
If Right(DefPath, 1) <> "\" Then
DefPath = DefPath & "\"
End If
On Error Resume Next
Fname = DefPath & strFile & ".xls"
aWb.SaveAs Fname
aWb.Close savechanges:
Set iMsg = CreateObject(
With iMsg
Set .Configuration = iConf
.to = strTo
.Subject = strSubj
.From = Trim(strSender)
'.TextBody = strbody
.AddAttachment Fname
.Send
End With
Set iMsg = Nothing
Kill Fname
On Error GoTo 0
End Sub
| 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