• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Excel dosyasını belirli bir email adresine gondermek

Katılım
17 Mart 2009
Mesajlar
102
Excel Vers. ve Dili
2013 english.
Merhaba Arkadaslar,

Excel sayfasında buton oluştururak, Sayfada yapılan herhangi işlemi bu butona tıklayarak, macro da tanımlı gmail alıcı adresine mail atıp Excel dosyasını gönderecek bir çalışma yapmam gerekiyor.

Yardımlarınız için şimdiden teşekkur ediyorum

Selam

Yeliz
 
Merhaba,

örnek dosyayı eklerseniz daha hızlı sonuç alırsınız
 
Merhab Tigiy,

Haklisin ornek bir excel dosyasi koymaliydim. ekte ornek bir calisma yaptım.

İlginiz icin tekrar tesekkur ederim.

Slm

Yeliz
 

Ekli dosyalar

bir kaynaktan bir kod buldum, ama calistiramadim. lutfen yardım edin arkadaslar


Sub gmailgonder()


Dim NewMail As CDO.Message

Set NewMail = New CDO.Message

'Enable SSL Authentication
NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

'Make SMTP authentication Enabled=true (1)

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "1"

'Set the SMTP server and port Details
'To get these details you can get on Settings Page of your Gmail Account

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smpt.gmail.com"

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Set your credentials of your Gmail Account

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yilmazyeliz1990@gmail.com"

NewMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "aqswdefr12"

'Update the configuration fields
NewMail.Configuration.Fields.Update

'Set All Email Properties

With NewMail

.Subject = "Test Mail from LearnExcelMacro.com"
.From = "yilmazyeliz1199@gmail.com"
.To = "yilmazyeliz1990@hotmail.com"
.CC = "yilmazyeliz1990@hotmail.com"
.BCC = ""
.TextBody = "deneme"

End With

NewMail.Send
'MsgBox("Mail has been Sent")


Set NewMail = Nothing

ActiveWorkbook.Save
Range("F3").Select
ActiveWorkbook.RunAutoMacros Which:=xlAutoClose
End Sub
 
Geri
Üst