Code: Select all
Private Sub INVIO_EMAIL(cc, D1)
Dim objApp As Outlook.Application
Dim objMsg As Outlook.MailItem
Dim FSO As FileSystemObject
Dim TS As Object
Dim strText As String
Set objApp = CreateObject("Outlook.Application")
Set objMsg = objApp.CreateItem(olMailItem)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set TS = FSO.OpenTextFile("C:\ASS_MF\TESTO_EMAIL.txt", ForReading)
strText = TS.ReadAll
With objMsg
.SentOnBehalfOfName = "KYC_Retail"
.To = DAG
.CC = cc '& ";" & D1
.Subject = "MI FU"
.Body = strText
' .Display
.Send
End With
Set objApp = Nothing
Set objMsg = Nothing
Set FSO = Nothing
Set TS = Nothing
End Sub
In my case is possible, without a otolook rule, to save a copy into folder Sal21, instead "Posta Inviata", ?????