DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub SendShByEmail()
Dim OutApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Dim ShName As String, WbName As String
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlManual
Sheets(ActiveSheet.Name).Copy
ShName = ActiveSheet.Name
ActiveSheet.DrawingObjects.Delete
Dim X As Range
For Each X In [a1:ar56]
If X.HasFormula = True Then
X.Value = X.Value
End If
Next X
WbName = ThisWorkbook.Path & "\" & ShName & ".xls"
ActiveWorkbook.SaveAs WbName, FileFormat:=-4143
ActiveWorkbook.Close False
Set OutApp = New Outlook.Application
Set NewMail = CreateItem(olMailItem)
With NewMail
.To = "ahmet@gmail.com" & ";" & "ahmet@hotmail.com" & ";" & "ahmet@yahoo.com" & ";" & "ahmet@windowslive.com" & ";" & "ahmet@yandex.com"
.Subject = "Sipariş Genel Durum"
.Body = "Sipariş Genel Durum Ektedir. İyi Günler."
.Attachments.Add WbName
.Save
.Send
End With
Set NewMail = Nothing
Set OutApp = Nothing
Set VBComp = Nothing
Kill WbName
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Sub mailgonder()
ActiveSheet.Copy 'aktif sayfayı kopyalar
With ActiveWorkbook
.SendMail Recipients:=Array("ahmet@gmail.com", "ahmet@gmail.com", "ahmet.ozgur@gmail.com"), _
Subject:="Sipairiş Genel Durum "
.Close SaveChanges:=False 'aktif sayfayı kaydetmeden kapatır
End With
MsgBox "Mail gönderildi"
End Sub