DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub mail()
Dim Sayfa As Worksheet
Dim Alan As Range
Dim daralan As Range
Set Alan = Worksheets("rapor").Range("A1:AF40")
Set Sayfa = Sheets("rapor")
gecicipath = ThisWorkbook.Path & "\"
pdffile = gecicipath & Range("w7") & " _ " & Range("I10") & " _ " & Range("w9") & " _ " & Range("I4") & ".pdf"
Alan.ExportAsFixedFormat Type:=xlTypePDF, Filename:=pdffile, openafterpublish:=False
With Alan
.Parent.Select
Set daralan = ActiveCell
.Select
ActiveWorkbook.EnvelopeVisible = False
With .Parent.MailEnvelope
.Introduction = " Merhaba " & Sheets("calisma").Range("I1") & vbCrLf & vbCrLf & " Rapor ektedir."
With .Item
.To = Sheets("calisma").Range("I2")
.CC = ""
.Subject = "Rapor" & "_" & "Rapor No." & Range("I10")
.BCC = ""
.Attachments.Add pdffile
.Send
End With
End With
daralan.Select
End With
Sayfa.Select
End Sub