Ustadlarım merhaba,
Otomatik gönderdiğim maillere ''hight'' bayrağı eklemek istiyorum bu mümkünmüdür.
Yardımcı olurmusunuz..
Syg,
E.ALAN
Kullandığım kodlar :
Sub send17()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
On Error Resume Next
Set rng = Sheets("MailRangeSelection").Range("AK283:AK296").SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "The selection is not a range or the sheet is protected" & _
vbNewLine & "please correct and try again.", vbOKOnly
Exit Sub
End If
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "xxxxxxxxxxxxxxxxx"
.CC = "xxxxxxxxxxxxxxxxx"
.BCC = ""
.Subject = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
.HTMLBody = RangetoHTML(rng)
.Display 'or use .Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Otomatik gönderdiğim maillere ''hight'' bayrağı eklemek istiyorum bu mümkünmüdür.
Yardımcı olurmusunuz..
Syg,
E.ALAN
Kullandığım kodlar :
Sub send17()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
On Error Resume Next
Set rng = Sheets("MailRangeSelection").Range("AK283:AK296").SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "The selection is not a range or the sheet is protected" & _
vbNewLine & "please correct and try again.", vbOKOnly
Exit Sub
End If
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "xxxxxxxxxxxxxxxxx"
.CC = "xxxxxxxxxxxxxxxxx"
.BCC = ""
.Subject = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
.HTMLBody = RangetoHTML(rng)
.Display 'or use .Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub